Unit castable abilities
- Vorherrschende Sprache
- C++
- Sterne
- 1
- Forks
- 0
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
The difference between unit abilities and heroes' spells is that the abilities don't _expire_, meaning they should have a different creation/destruction mechanism. My ideas are:
- create the spell object when the CastSpell event is received by looking up the spell UID in the resource manager using the unit's table
- cast the spell, and it will have no server-issued UID
I also believe a similar mechanism should be taken for casting every spell: right now the hand is completely exploitable by sniffing the DrawSpells event, which broadcasts to all players the spells they've received in their hand. Now the way around this is:
- on DrawSpells, send that event only to the active player.. to the other players, send the _number_ of spells drawn.
- on any further CastSpell, we send the UID of the spell and its name identifier
- for every client, they check if a spell with such a UID exists, if it does, they use it
- if the spell doesn't exist (non-active players) then they create it, and cast it
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.