All commands can only have creature as the affected by command
*_SET_ACTIVEOBJECT - switch activeObject state on/off
*_SET_FACTION - changes faction
*_MORPH_TO_ENTRY_OR_MODEL - changes model to model from creature_template entry or model id explicit
*_MOUNT_TO_ENTRY_OR_MODEL - mounts on model from creature_template entry or model id explicit
*_SET_RUN - switch walkmode on/off
Signed-off-by: NoFantasy <nofantasy@nf.no>
In addition to adding fields for text id storage (in total 4 text id's), also added a comments field for developers notes in scripts (it may help those being old of age to remember what goes on in a script).
Signed-off-by: NoFantasy <nofantasy@nf.no>
It well known at account data loading if character/account have
in account data string look like pritf format string (with %s for example)
Thanks for research porblem to jwo@lighthouseapp.com!
datalong can be 0:idle, 2:random, 3:waypoint. In case 3, creature must have a existing creature_movement_template.
Command start movement for source of script. If source is not creature but target is, it will apply to target.
Optionally creature entry can be defined (datalong2) and start movement for this if found nearby (search radius defined in datalong3).
Signed-off-by: NoFantasy <nofantasy@nf.no>
* Some spells expect this.
* Check SPELL_AURA_MOD_PET_AOE_DAMAGE_AVOIDANCE just for similarity,
currently no spels with aura 310 with special school masks.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
uint32 result used in most expressions for stack calculation/compare
Alos uint8implicitly casted to int by C++ in expressions that generate unexpected
signed/unsigned warnings in comparisons (uint8 +1) > uint32 and similar.
In addition add use of UNIT_DYNFLAG_TAPPED_BY_PLAYER
Added check to see if creature is tapped for isAllowedToLoot()
Signed-off-by: NoFantasy <nofantasy@nf.no>
Note: all spells with effect expect additional code for redirection reset.
Until code adding redirection work longer that expected.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Patch partly rewrited with move new data into HostileRefManager
and added redirection to threatAssist. Also bug fixed with
redirection threat to unit not in hostile list yet.
Also implement proper work CMSG_FAR_SIGHT.
This packet control switch view point from far sight object to caster
and back wihtout modify far sight object seelction.
In fact it general problem possible with area auras if it re-casted
non-standard way from code. But known only test case for mangos-0.12 branch.
Thanks to ciphercom for reportand original research of problem source.
*CORPSE_DECAY values adjusted (Rare/RareElite values are guessed) with more proper.
*RATE_CORPSE_DECAY_LOOTED is now 0.0 as default and a modifier of the creatures spawntimesecs are used for corpse decay.
Respawn time for creature is now set at death (result: database spawntimesecs are in most cases the time it takes from kill to respawn)
Overall, this will affect four things:
* corpse will stay visible longer before looted
* corpse will stay visible longer after looted, when creature has long respawn time
* creature without loot will "skip" the default decay times and then fix a "should respawn almost instant" -problem
* creature with loot and very short respawn time may respawn instantly after looted
Signed-off-by: NoFantasy <nofantasy@nf.no>