mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 10:00:28 +00:00
feat(Core/Creature): Allow 3 ids per spawn point. TESTING (#10169)
* feat(Core/Creature): Allow 3 ids per spawn point. * Move GetRandomId to a function * Update id to id1 * Fixed some errors crashing core and text * Set ids to lowercase for GetRandomId function * Update src/server/database/Database/Implementation/WorldDatabase.cpp Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Co-authored-by: acidmanifesto <joshua.lee.betts@gmail.com> Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -223,7 +223,7 @@ public:
|
||||
{
|
||||
ObjectGuid::LowType guid = sObjectMgr->GenerateCreatureSpawnId();
|
||||
CreatureData& data = sObjectMgr->NewOrExistCreatureData(guid);
|
||||
data.id = id;
|
||||
data.id1 = id;
|
||||
data.phaseMask = chr->GetPhaseMaskForSpawn();
|
||||
data.posX = chr->GetTransOffsetX();
|
||||
data.posY = chr->GetTransOffsetY();
|
||||
@@ -595,14 +595,14 @@ public:
|
||||
uint32 displayid = target->GetDisplayId();
|
||||
uint32 nativeid = target->GetNativeDisplayId();
|
||||
uint32 entry = target->GetEntry();
|
||||
uint32 creature_id1 = 0;
|
||||
uint32 creature_id2 = 0;
|
||||
float chance_id1 = 0.0f;
|
||||
uint32 id1 = 0;
|
||||
uint32 id2 = 0;
|
||||
uint32 id3 = 0;
|
||||
if (CreatureData const* cData = target->GetCreatureData())
|
||||
{
|
||||
creature_id1 = cData->id;
|
||||
creature_id2 = cData->id2;
|
||||
chance_id1 = cData->chance_id1;
|
||||
id1 = cData->id1;
|
||||
id2 = cData->id2;
|
||||
id3 = cData->id3;
|
||||
}
|
||||
|
||||
int64 curRespawnDelay = target->GetRespawnTimeEx() - time(nullptr);
|
||||
@@ -611,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(), entry, creature_id1, creature_id2, chance_id1, displayid, nativeid, faction, npcflags);
|
||||
handler->PSendSysMessage(LANG_NPCINFO_CHAR, target->GetSpawnId(), target->GetGUID().GetCounter(), entry, id1, id2, id3, 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