* Now expected item limit categories (for example for item 5513 and related)
correctly limited by its amount in inventory.
* Provide and use additional arg in SendEquipError for alt. way get affected
item prototype. This let send to function item id and prevent crash client at
limit category equip errors that required item prototype data.
* Use area id instead zone id for home bind zone info as expected.
This will for example proper show capital name in area himebinding for capital; tavern.
* Clarify that player create zone in fact is area (subzone)
* Implement SPELL_EFFECT_BIND for normal homebinding.
Also support spell target position mode used in 53823/53821 spells
* Add Spell::EffectEmpty for mark spell effects that used but not expect any code in handler.
Example weapon spells that used just as known spell markers for client.
Original patch idea inspirit by Sadikum patch suggestion.
* New config option MaxSpellCastsInChain ( 0 is disabled old way work )
* Check added for prevent stack overflow crashes in case infinity triggered casts sequences
with more useful error output instead crash.
* Default config steeing in 10 casts expected to allow all possible in game proper cast chains.
* Add 2 function for 2 used way for original caster
- GetAffectiveCaster(), is posible NULL unit as source spell affects
(explcit caster, GO owner, caster of aura that trigering affect)..
- GetCastingObject(), possible NULL world object as in game spell effects
source, cast center, etc, need because original caster can store GO
guid that apply effect around. In other cases m_caster
* Use functions and avoid use explicitly m_originalCaster
* Use GetAffectiveCaster() for fix explicit GO cast at near unit, like now fixed campfire bonus.
* Implement way ignore some redundent data for triggered spells base at cast cost exist.
Reason: some triggered spells inherited data from main spells
just for porper client show spell attributes, we not need this data.
* Use check for ignore inherited cast time.
* It was wasting CPU power as cell-level locking is not needed.
* Future multithreading will be on map-level.
* CellLock was just a 'proxy' between Cell and CellPair and in some cases carried redundant data.
* Some minor cleanup in Cell::Visit/Map::Visit.
* Also replace check/take functions for runes by single 2 mode function
* Implement proper check for dead runes case
* Implement proper rune selection for Aura::HandleAuraConvertRune
* Re-number enums by function groups and use where possible new defined masks in code instead raw enum |-lists.
* Avoid use movement generator generic state markers like UNIT_STAT_CONFUSED for mark movement stoped.
Add special shadow UNIT_STAT_CONFUSED_MOVE/etc states for like use.
UNIT_STAT_CONFUSED in like case will be safe expect use for normal checks confused state presence
And UNIT_STAT_CONFUSED_MOVE for check real move in this state
* Many spell effects that have A target mode SELF2 expected applied to enemy
target selected by targetmode B so we need skip SELF2 target mode.
* remove SEFL2 from explicit positive target modes.
All effect target modes start from client provided target data
so all its must be used for checking explicit target modes.
For example exist spells that have as first effect SELF non-explicit target mode.
but in same time negative to explicit target.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Also add caching IsHostileTo/IsFriendlyTo for avoid recall this not fast functions.