* Replace max bg type checks by DBC valid index check
* Use in functions and fields BattlegroundTypeId type instead uint32
* Fixed wrong use bg queue ids instead bg type ids in queue update/remove function calls.
Many bg have same raw values for type id and queue id but some can be affected by this bug:
BATTLEGROUND_EY, BATTLEGROUND_SA, and all areans (with small arena/team size exceptions)
* Move Battlemaster to bg type ids map fron ObjectMgr to BatteleGroundMgr.
* Remobe redundent for header itself includes for BG headers.
* Use Auction location enum instead raw valus.
* Store phase mask for creatures/gameobjects/corpse in DB
* Propertly set phase for summoned creatures/gameobjects/pets/corpses/spell related dynobjects
* Select proper phase for spawned creature/gameobjects and save it in DB
TODO: in game commands.
Big thanks ApoC for help create table.
Fixed bonuses for stacked periodic
Warning need test all coefficients for correct bonus amount.
TODO:
use this table for absorb bonus calculation
use this table for melee spells AP bonuses
use chain multipler in final damage/heal amount
Signed-off-by: DiSlord <dislord@nomail.com>
* Mark spells learned in result character creating, another spell learning, skill grow,
quest reward as dependent and not store its in `character_spell`.
* Prevent re-learning known spell in expected state
* Prevent re-learning low rank spell as active if higher rank known.
* New type of non-stacked ranked spells check: skill dependent spell bonuses.
* Activate (show propetly and cast if need) lesser spell rank
for non-stackable in spellbooks spells at unlearn high rank
Fixed work all Huter traps target selection
More check in ObjectAccessor::Get Object
More generic work 22 TARGET_CASTER_COORDINATES target type
Signed-off-by: DiSlord <dislord@nomail.com>
* Replace reqClass by reqSkillVlaue field in `skill_discovery_template`
and check expected skill points amount for specific reipe discovery.
* Add new `spell_loot_template` loot table for store item selection data for spells.
At this moment for expclicit recipes discovery spells.
* Code cleanups.
Coorrect update Talent Points on levelup / leveldown
Unlearn other ranks of learned talent
Fix typo in Pet::HasSpell (wrong result for removed spell)
Allow .reset talents reset pet talent
Implement SPELL_AURA_MOD_PET_TALENT_POINTS aura (hunter talent)
Only reset pet talent from trainer unlearn.
Signed-off-by: DiSlord <dislord@nomail.com>
* Implement SPELL_EFFECT_CREATE_ITEM_2 (157). This alos let work many item creating spells.
* Add `skill_discovery_template`.`reqClass` for allow clas specific racipes storing in table.
* Make primary key for `skill_discovery_template` pair (spellId,reqSpell) that allow have duplicate recipes for different reqSpells.
* Implement SPELL_EFFECT_SCRIPT (77) cases for explicit recipe discovery spells with learn spell selected by `skill_discovery_template` data.
Note: as expected explicit recipe discovery abilities always return some spell while exist any not learned yet for player class.
Correct totem immunes for dot/leech/Fear/Transform auras (immune only to effect)
Correct log if all effects immuned by Effect Immune
Move check for IMMUNITY_STATE to Unit::IsImmunedToSpellEffect
Signed-off-by: DiSlord <dislord@nomail.com>