Merge branch 'master' into Playerbot
# Conflicts: # src/server/game/Guilds/Guild.cpp
This commit is contained in:
@@ -590,6 +590,14 @@ void ScriptMgr::OnLootItem(Player* player, Item* item, uint32 count, ObjectGuid
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnStoreNewItem(Player* player, Item* item, uint32 count)
|
||||
{
|
||||
ExecuteScript<PlayerScript>([&](PlayerScript* script)
|
||||
{
|
||||
script->OnStoreNewItem(player, item, count);
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnCreateItem(Player* player, Item* item, uint32 count)
|
||||
{
|
||||
ExecuteScript<PlayerScript>([&](PlayerScript* script)
|
||||
|
||||
@@ -69,19 +69,19 @@ void ScriptMgr::ModifyMeleeDamage(Unit* target, Unit* attacker, uint32& damage)
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::ModifySpellDamageTaken(Unit* target, Unit* attacker, int32& damage)
|
||||
void ScriptMgr::ModifySpellDamageTaken(Unit* target, Unit* attacker, int32& damage, SpellInfo const* spellInfo)
|
||||
{
|
||||
ExecuteScript<UnitScript>([&](UnitScript* script)
|
||||
{
|
||||
script->ModifySpellDamageTaken(target, attacker, damage);
|
||||
script->ModifySpellDamageTaken(target, attacker, damage, spellInfo);
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::ModifyHealRecieved(Unit* target, Unit* attacker, uint32& damage)
|
||||
void ScriptMgr::ModifyHealReceived(Unit* target, Unit* healer, uint32& heal, SpellInfo const* spellInfo)
|
||||
{
|
||||
ExecuteScript<UnitScript>([&](UnitScript* script)
|
||||
{
|
||||
script->ModifyHealRecieved(target, attacker, damage);
|
||||
script->ModifyHealReceived(target, healer, heal, spellInfo);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -242,3 +242,11 @@ void ScriptMgr::OnUnitDeath(Unit* unit, Unit* killer)
|
||||
script->OnUnitDeath(unit, killer);
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnAuraApply(Unit* unit, Aura* aura)
|
||||
{
|
||||
ExecuteScript<UnitScript>([&](UnitScript* script)
|
||||
{
|
||||
script->OnAuraApply(unit, aura);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -429,16 +429,18 @@ public:
|
||||
virtual void ModifyMeleeDamage(Unit* /*target*/, Unit* /*attacker*/, uint32& /*damage*/) { }
|
||||
|
||||
// Called when Spell Damage is being Dealt
|
||||
virtual void ModifySpellDamageTaken(Unit* /*target*/, Unit* /*attacker*/, int32& /*damage*/) { }
|
||||
virtual void ModifySpellDamageTaken(Unit* /*target*/, Unit* /*attacker*/, int32& /*damage*/, SpellInfo const* /*spellInfo*/) { }
|
||||
|
||||
// Called when Heal is Recieved
|
||||
virtual void ModifyHealRecieved(Unit* /*target*/, Unit* /*attacker*/, uint32& /*damage*/) { }
|
||||
virtual void ModifyHealReceived(Unit* /*target*/, Unit* /*healer*/, uint32& /*heal*/, SpellInfo const* /*spellInfo*/) { }
|
||||
|
||||
//Called when Damage is Dealt
|
||||
virtual uint32 DealDamage(Unit* /*AttackerUnit*/, Unit* /*pVictim*/, uint32 damage, DamageEffectType /*damagetype*/) { return damage; }
|
||||
|
||||
virtual void OnBeforeRollMeleeOutcomeAgainst(Unit const* /*attacker*/, Unit const* /*victim*/, WeaponAttackType /*attType*/, int32& /*attackerMaxSkillValueForLevel*/, int32& /*victimMaxSkillValueForLevel*/, int32& /*attackerWeaponSkill*/, int32& /*victimDefenseSkill*/, int32& /*crit_chance*/, int32& /*miss_chance*/, int32& /*dodge_chance*/, int32& /*parry_chance*/, int32& /*block_chance*/ ) { };
|
||||
|
||||
virtual void OnAuraApply(Unit* /*unit*/, Aura* /*aura*/) { }
|
||||
|
||||
virtual void OnAuraRemove(Unit* /*unit*/, AuraApplication* /*aurApp*/, AuraRemoveMode /*mode*/) { }
|
||||
|
||||
[[nodiscard]] virtual bool IfNormalReaction(Unit const* /*unit*/, Unit const* /*target*/, ReputationRank& /*repRank*/) { return true; }
|
||||
@@ -1180,6 +1182,9 @@ public:
|
||||
//After looting item
|
||||
virtual void OnLootItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/, ObjectGuid /*lootguid*/) { }
|
||||
|
||||
//After looting item (includes master loot).
|
||||
virtual void OnStoreNewItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/) { }
|
||||
|
||||
//After creating item (eg profession item creation)
|
||||
virtual void OnCreateItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/) { }
|
||||
|
||||
@@ -2314,6 +2319,7 @@ public: /* PlayerScript */
|
||||
void GetCustomArenaPersonalRating(Player const* player, uint8 slot, uint32& rating) const;
|
||||
void OnGetMaxPersonalArenaRatingRequirement(Player const* player, uint32 minSlot, uint32& maxArenaRating) const;
|
||||
void OnLootItem(Player* player, Item* item, uint32 count, ObjectGuid lootguid);
|
||||
void OnStoreNewItem(Player* player, Item* item, uint32 count);
|
||||
void OnCreateItem(Player* player, Item* item, uint32 count);
|
||||
void OnQuestRewardItem(Player* player, Item* item, uint32 count);
|
||||
void OnGroupRollRewardItem(Player* player, Item* item, uint32 count, RollVote voteType, Roll* roll);
|
||||
@@ -2471,10 +2477,11 @@ public: /* UnitScript */
|
||||
void OnDamage(Unit* attacker, Unit* victim, uint32& damage);
|
||||
void ModifyPeriodicDamageAurasTick(Unit* target, Unit* attacker, uint32& damage);
|
||||
void ModifyMeleeDamage(Unit* target, Unit* attacker, uint32& damage);
|
||||
void ModifySpellDamageTaken(Unit* target, Unit* attacker, int32& damage);
|
||||
void ModifyHealRecieved(Unit* target, Unit* attacker, uint32& addHealth);
|
||||
void ModifySpellDamageTaken(Unit* target, Unit* attacker, int32& damage, SpellInfo const* spellInfo);
|
||||
void ModifyHealReceived(Unit* target, Unit* healer, uint32& addHealth, SpellInfo const* spellInfo);
|
||||
uint32 DealDamage(Unit* AttackerUnit, Unit* pVictim, uint32 damage, DamageEffectType damagetype);
|
||||
void OnBeforeRollMeleeOutcomeAgainst(Unit const* attacker, Unit const* victim, WeaponAttackType attType, int32& attackerMaxSkillValueForLevel, int32& victimMaxSkillValueForLevel, int32& attackerWeaponSkill, int32& victimDefenseSkill, int32& crit_chance, int32& miss_chance, int32& dodge_chance, int32& parry_chance, int32& block_chance);
|
||||
void OnAuraApply(Unit* /*unit*/, Aura* /*aura*/);
|
||||
void OnAuraRemove(Unit* unit, AuraApplication* aurApp, AuraRemoveMode mode);
|
||||
bool IfNormalReaction(Unit const* unit, Unit const* target, ReputationRank& repRank);
|
||||
bool IsNeedModSpellDamagePercent(Unit const* unit, AuraEffect* auraEff, float& doneTotalMod, SpellInfo const* spellProto);
|
||||
|
||||
Reference in New Issue
Block a user