mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 06:36:24 +00:00
Merge branch 'master' into Playerbot
# Conflicts: # src/server/apps/worldserver/worldserver.conf.dist # src/server/game/Battlegrounds/Battleground.h # src/server/game/Entities/Player/Player.cpp # src/server/game/World/World.cpp
This commit is contained in:
@@ -161,3 +161,18 @@ void ScriptMgr::OnLoadSpellCustomAttr(SpellInfo* spell)
|
||||
script->OnLoadSpellCustomAttr(spell);
|
||||
});
|
||||
}
|
||||
|
||||
bool ScriptMgr::OnAllowedForPlayerLootCheck(Player const* player, ObjectGuid source)
|
||||
{
|
||||
auto ret = IsValidBoolScript<GlobalScript>([&](GlobalScript* script)
|
||||
{
|
||||
return script->OnAllowedForPlayerLootCheck(player, source);
|
||||
});
|
||||
|
||||
if (ret && *ret)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -210,3 +210,35 @@ void ScriptMgr::OnUnitUpdate(Unit* unit, uint32 diff)
|
||||
script->OnUnitUpdate(unit, diff);
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnDisplayIdChange(Unit* unit, uint32 displayId)
|
||||
{
|
||||
ExecuteScript<UnitScript>([&](UnitScript* script)
|
||||
{
|
||||
script->OnDisplayIdChange(unit, displayId);
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnUnitEnterEvadeMode(Unit* unit, uint8 evadeReason)
|
||||
{
|
||||
ExecuteScript<UnitScript>([&](UnitScript* script)
|
||||
{
|
||||
script->OnUnitEnterEvadeMode(unit, evadeReason);
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnUnitEnterCombat(Unit* unit, Unit* victim)
|
||||
{
|
||||
ExecuteScript<UnitScript>([&](UnitScript* script)
|
||||
{
|
||||
script->OnUnitEnterCombat(unit, victim);
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnUnitDeath(Unit* unit, Unit* killer)
|
||||
{
|
||||
ExecuteScript<UnitScript>([&](UnitScript* script)
|
||||
{
|
||||
script->OnUnitDeath(unit, killer);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user