mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
fix(Core/GM Commands): Update NPC Info command (#10157)
* fix(Core/GM Commands): Update NPC Info command * Update rev_1642085410673517853.sql * Update rev_1642085410673517853.sql * Prevent temp spawn crashing Co-authored-by: acidmanifesto <joshua.lee.betts@gmail.com>
This commit is contained in:
@@ -594,7 +594,16 @@ public:
|
||||
uint32 spellSchoolImmuneMask = cInfo->SpellSchoolImmuneMask;
|
||||
uint32 displayid = target->GetDisplayId();
|
||||
uint32 nativeid = target->GetNativeDisplayId();
|
||||
uint32 Entry = target->GetEntry();
|
||||
uint32 entry = target->GetEntry();
|
||||
uint32 creature_id1 = 0;
|
||||
uint32 creature_id2 = 0;
|
||||
float chance_id1 = 0.0f;
|
||||
if (CreatureData const* cData = target->GetCreatureData())
|
||||
{
|
||||
creature_id1 = cData->id;
|
||||
creature_id2 = cData->id2;
|
||||
chance_id1 = cData->chance_id1;
|
||||
}
|
||||
|
||||
int64 curRespawnDelay = target->GetRespawnTimeEx() - time(nullptr);
|
||||
if (curRespawnDelay < 0)
|
||||
@@ -602,7 +611,7 @@ public:
|
||||
std::string curRespawnDelayStr = secsToTimeString(uint64(curRespawnDelay), true);
|
||||
std::string defRespawnDelayStr = secsToTimeString(target->GetRespawnDelay(), true);
|
||||
|
||||
handler->PSendSysMessage(LANG_NPCINFO_CHAR, target->GetSpawnId(), target->GetGUID().GetCounter(), faction, npcflags, Entry, displayid, nativeid);
|
||||
handler->PSendSysMessage(LANG_NPCINFO_CHAR, target->GetSpawnId(), target->GetGUID().GetCounter(), entry, creature_id1, creature_id2, chance_id1, displayid, nativeid, faction, npcflags);
|
||||
handler->PSendSysMessage(LANG_NPCINFO_LEVEL, target->getLevel());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_EQUIPMENT, target->GetCurrentEquipmentId(), target->GetOriginalEquipmentId());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_HEALTH, target->GetCreateHealth(), target->GetMaxHealth(), target->GetHealth());
|
||||
|
||||
Reference in New Issue
Block a user