safety
parent
c1464c55e1
commit
3290fcbdef
|
@ -106,7 +106,7 @@ public:
|
||||||
|
|
||||||
void OnLogin(Player* player) override
|
void OnLogin(Player* player) override
|
||||||
{
|
{
|
||||||
if (player->GetSession()->IsBot())
|
if (!player->GetSession() || player->GetSession()->IsBot())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ public:
|
||||||
|
|
||||||
void SaveData(Player* player)
|
void SaveData(Player* player)
|
||||||
{
|
{
|
||||||
if (player->GetSession()->IsBot())
|
if (!player->GetSession() || player->GetSession()->IsBot())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -188,7 +188,12 @@ public:
|
||||||
|
|
||||||
void OnSpellCast(Player* player, Spell* spell, bool /*skipCheck*/) override
|
void OnSpellCast(Player* player, Spell* spell, bool /*skipCheck*/) override
|
||||||
{
|
{
|
||||||
if (!NeedsEnabled || !spell->m_CastItem || player->GetSession()->IsBot())
|
if (!NeedsEnabled || !player || !player->GetSession())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!spell->m_CastItem || player->GetSession()->IsBot())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -225,7 +230,7 @@ public:
|
||||||
|
|
||||||
void OnBeforeUpdate(Player* player, uint32 /* p_time */) override
|
void OnBeforeUpdate(Player* player, uint32 /* p_time */) override
|
||||||
{
|
{
|
||||||
if (!NeedsEnabled || !player->IsInWorld() || !player->IsAlive() || player->GetSession()->IsBot())
|
if (!NeedsEnabled || !player->IsInWorld() || !player->IsAlive() || !player->GetSession() || player->GetSession()->IsBot())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue