Move LoadFromDB from player session to world session (#1173)

This commit is contained in:
Yunfan Li
2025-04-08 20:54:51 +08:00
committed by GitHub
parent cd5b15ddc1
commit 3f52563ca7
2 changed files with 8 additions and 13 deletions

View File

@@ -47,7 +47,10 @@ bool CastCustomSpellAction::Execute(Event event)
{
if (!target)
target = botAI->GetUnit(go);
if (!botAI->GetUnit(go) || !botAI->GetUnit(go)->IsInWorld())
continue;
chat->eraseAllSubStr(text, chat->FormatWorldobject(botAI->GetUnit(go)));
}