feat(Core/Creature): Implement quest_greetings table (#10526)

* cherry-pick commit (6dda09818d)

Co-Authored-By: ForesterDev <11771800+ForesterDev@users.noreply.github.com>
Co-Authored-By: Giacomo Pozzoni <giacomopoz@gmail.com>
This commit is contained in:
Kitzunu
2022-03-06 18:19:08 +01:00
committed by GitHub
parent fda8b723de
commit d927ce6fac
8 changed files with 258 additions and 24 deletions

View File

@@ -149,7 +149,7 @@ void Player::SendPreparedQuest(ObjectGuid guid)
}
}
}
// multiple entries
// multiple entries
else
{
QEmote qe;
@@ -179,8 +179,8 @@ void Player::SendPreparedQuest(ObjectGuid guid)
int loc_idx = GetSession()->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
if (NpcTextLocale const* nl = sObjectMgr->GetNpcTextLocale(textid))
ObjectMgr::GetLocaleString(nl->Text_0[0], loc_idx, title);
if (NpcTextLocale const* npcTextLocale = sObjectMgr->GetNpcTextLocale(textid))
ObjectMgr::GetLocaleString(npcTextLocale->Text_0[0], loc_idx, title);
}
else
{
@@ -188,11 +188,12 @@ void Player::SendPreparedQuest(ObjectGuid guid)
int loc_idx = GetSession()->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
if (NpcTextLocale const* nl = sObjectMgr->GetNpcTextLocale(textid))
ObjectMgr::GetLocaleString(nl->Text_1[0], loc_idx, title);
if (NpcTextLocale const* npcTextLocale = sObjectMgr->GetNpcTextLocale(textid))
ObjectMgr::GetLocaleString(npcTextLocale->Text_1[0], loc_idx, title);
}
}
}
PlayerTalkClass->SendQuestGiverQuestList(qe, title, guid);
}
}