Core: wire OnPlayerTalkToCreature hook in Player::TalkedToCreature
The module's OnTalkToCreature quest-mimic handler was never reachable — the hook had no call site. 'Use item on NPC' objectives (quest 433, Runes of Return on Trapped Miners) credit through TalkedToCreature (often via the NPC's SmartAI), so bots never received the TALKTO objective credit when the owner used the item. Add the hunk to the ThordekkCore patch.
This commit is contained in:
@@ -1241,6 +1241,20 @@ index b82bd78f34..d58f648db8 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Player::KilledPlayerCredit(ObjectGuid victimGuid)
|
void Player::KilledPlayerCredit(ObjectGuid victimGuid)
|
||||||
|
@@ -16941,6 +16941,13 @@ void Player::KillCreditGO(uint32 entry, ObjectGuid guid)
|
||||||
|
|
||||||
|
void Player::TalkedToCreature(uint32 entry, ObjectGuid guid)
|
||||||
|
{
|
||||||
|
+#if TRINITY_PLAYERBOT_V2
|
||||||
|
+ // PlayerbotV2 quest mimic: "use item on NPC" / talk-to-creature credit
|
||||||
|
+ // (e.g. quest 433 Runes of Return on Trapped Miners) flows through this
|
||||||
|
+ // method (often via SmartAI on the NPC). Propagate to owned bots so they
|
||||||
|
+ // gain the same TALKTO objective credit.
|
||||||
|
+ Playerbot::Hooks::OnPlayerTalkToCreature(this, entry, guid);
|
||||||
|
+#endif
|
||||||
|
UpdateQuestObjectiveProgress(QUEST_OBJECTIVE_TALKTO, entry, 1, guid);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -18265,6 +18334,13 @@ void Player::SetHomebind(WorldLocation const& loc, uint32 areaId)
|
@@ -18265,6 +18334,13 @@ void Player::SetHomebind(WorldLocation const& loc, uint32 areaId)
|
||||||
stmt->setFloat(5, m_homebind.GetOrientation());
|
stmt->setFloat(5, m_homebind.GetOrientation());
|
||||||
stmt->setUInt64(6, GetGUID().GetCounter());
|
stmt->setUInt64(6, GetGUID().GetCounter());
|
||||||
|
|||||||
Reference in New Issue
Block a user