mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 01:23:51 +00:00
refactor: extract getUnitByGuid() to replace 10 entity lookup + dynamic_cast patterns
Add GameHandler::getUnitByGuid() that combines entityManager.getEntity() with dynamic_cast<Unit*>. Replaces 10 two-line lookup+cast blocks with single-line calls.
This commit is contained in:
parent
c8617d20c8
commit
fe043b5da8
2 changed files with 16 additions and 20 deletions
|
|
@ -2517,6 +2517,7 @@ private:
|
|||
void triggerQuestAcceptResync(uint32_t questId, uint64_t npcGuid, const char* reason);
|
||||
bool hasQuestInLog(uint32_t questId) const;
|
||||
std::string guidToUnitId(uint64_t guid) const;
|
||||
Unit* getUnitByGuid(uint64_t guid);
|
||||
std::string getQuestTitle(uint32_t questId) const;
|
||||
const QuestLogEntry* findQuestLogEntry(uint32_t questId) const;
|
||||
int findQuestLogSlotIndexFromServer(uint32_t questId) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue