removed redundant check at MoveInLos
this check is already done in istargetableForAttack
thx to NoFantasy
fixed in isVisibleForOrDetect that isInvisbleForAlive
wasn't checked.. and therefore all spiritserviceprovider
got visible
thx to NetSky
with that i've implemented all known auras which makes
units invisible for alive.. but that's currently quite hacky
i think best would be if we could set a unit-flag after those auras
getting applied
this reverts 8676 (9c50d9e70314b0cd9eb0fe3bac8040d64a9965a5)
the new flag is from wdb-files so your database should be
already alright
also i've dropped the function Player::CanInteractWithNPCs
cause it was used only in one place and didn't seem to make anything
easier
NOTE for this flag:
it just means that the creature can be seen by ghost-players
too..
so they are still visible for alive players.. unless a special
aura or ther unitflag (spiritguide/healer) disables this..
(see next commit for it)
with this flag you can specify a creature to be only
visible for dead players - this removes all hacks from
spiritguides/spirithealers from code and allows some other
special creatures
i decided to not implement an extra deathstate cause
actualy those creatures are almost equal to living ones
* Use stored in aura amount percent damage ignore for auras SPELL_AURA_MOD_IGNORE_ABSORB_FOR_SPELL
* Implement apply percent damage ignore for absorb (SPELL_AURA_MOD_IGNORE_ABSORB_SCHOOL (194))
and redunction (SPELL_AURA_MOD_IGNORE_DAMAGE_REDUCTION_SCHOOL (269)).
Later need recheck what from this 2 auras applied to armor reduction
(currently 269 used only in single spell and this spell is single affecting armor
and single normal school damage applied with 194 aura)
Also unclear is this must applied to DoTs, expected that not need.
* Implement talent 53375 boots for spell 31884.
* Add single arg version Unit::AddThreat for just adding to threat list.
* Req. provide schollmask and crit flag for any real threat value for proper threats mod apply.
* Send crit flag in DealDamage as MELEE_HIT_CRIT for spell damage for later send to threat call.
* For not affected by modifiers threat values use SPELL_SCHOOL_MASK_NONE.
* Implement aura SPELL_AURA_MOD_CRITICAL_THREAT (used only in itemset 529 effect).
This patch implements storing guid->object pairs on per map level, this leads
to less locking in ObjectAccessor in case of further multithreaded map update.
For case of cross map guid looking (auras cases) all maps are linked into
ObjectAccessor and can be traversed for this lookup.
Signed-off-by: ApoC <apoc@nymfe.net>
* Always use machanic masks in form (1 << (mech-1)), fix all cases.
* Imppement SPELL_AURA_MECHANIC_IMMUNITY_MASK (mostly boss/elite spells).
Note: db stored mechannic masks already stored in proper format so not affected.
* calculation depends on the damageClass now
->SPELL_DAMAGE_CLASS_RANGED & SPELL_DAMAGE_CLASS_MELEE use MeleeDamageBonus()
->SPELL_DAMAGE_CLASS_MAGIC & SPELL_DAMAGE_CLASS_RANGED use SpellDamageBonus()
* changes/improvements in MeleeDamageBonus:
-> improved criterions to apply bonuses
-> implemented scaling of FLAT damage Bonus for non weapon damage based spells
-> support of DOT's
-> added pet's bonus damage for non weapon based spells
* general cleanup in CalculateSpellDamage() and MeleeDamageBonus()
* implemented global helper functions GetWeaponAttackType() and GetAuraTicks() in SpellMgr
Signed-off-by: ApoC <apoc@nymfe.net>
use an extra function for setfeigndeath()
like it's done with setfeared already..
allow to apply feigndeath on creatures too
avoid moving of creatures with feign death applied
and start attacking last victim when feigndeath disappears
sql won't be included - please look at your database
providers forum
also note, that creature_loot_template id 0
is used for the loot of dead players in this bg
(after a player died and you remove insignia from him..
he not only drops money - he drops some random items too)
further work must be done in better code for adjusting right
levels to creatures - maybe using something similar like it's
done in heroic instances
also quests and creatures needs some scripts in future
thanks to:
netsky - initial start of this patch
bogie - 2nd person writing on this patch
triply, kapatejib, vladimir - code review and suggestions
arrai - for his great tool and help
and all testers / code contributers - I won't write
down a list, else I would forget most probably one ^^
the problem was in Unit::setFeared
which got called after removing a fearaura
inside setFeared there is a check for isAlive()
which will return true in this case, cause m_deathState
is updated only after RemoveAllAurasOnDeath()
a fix could be to set m_deathState earlier, but
then auras which require a spellcast on remove
won't work anymore..
(not sure if we actualy have such auras)
but if in future more functions will require special code there,
moving the m_deathState setting should be considered
big thx to Naicisum for explanation and investigation
i added a function IsDeathOnlySpell() which returns true
if this spell can ONLY be casted while dead, so i haven't
implemented all spells which could be cast while dead..