mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Fix crash
This commit is contained in:
@@ -661,15 +661,16 @@ void ChatReplyAction::ChatReplyDo(Player* bot, uint32 type, uint32 guid1, uint32
|
||||
LOG_ERROR("playerbots", "plr pointer is nullptr chat whisper");
|
||||
}
|
||||
|
||||
if (type == CHAT_MSG_SAY)
|
||||
else if (type == CHAT_MSG_SAY)
|
||||
{
|
||||
LOG_INFO("playerbots", "say respond: {}", respondsText);
|
||||
if (bot->GetTeamId() == TEAM_ALLIANCE)
|
||||
bot->Say(respondsText, LANG_COMMON);
|
||||
else
|
||||
bot->Say(respondsText, LANG_ORCISH);
|
||||
}
|
||||
|
||||
if (type == CHAT_MSG_YELL)
|
||||
else if (type == CHAT_MSG_YELL)
|
||||
{
|
||||
if (bot->GetTeamId() == TEAM_ALLIANCE)
|
||||
bot->Yell(respondsText, LANG_COMMON);
|
||||
@@ -677,7 +678,7 @@ void ChatReplyAction::ChatReplyDo(Player* bot, uint32 type, uint32 guid1, uint32
|
||||
bot->Yell(respondsText, LANG_ORCISH);
|
||||
}
|
||||
|
||||
if (type == CHAT_MSG_GUILD)
|
||||
else if (type == CHAT_MSG_GUILD)
|
||||
{
|
||||
if (!bot->GetGuildId())
|
||||
return;
|
||||
@@ -696,4 +697,4 @@ void ChatReplyAction::ChatReplyDo(Player* bot, uint32 type, uint32 guid1, uint32
|
||||
}
|
||||
GET_PLAYERBOT_AI(bot)->GetAiObjectContext()->GetValue<time_t>("last said", "chat")->Set(time(nullptr) + urand(5, 25));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user