Map local guids 6.x -> 4.3.4
Ported the following commits: https://github.com/TrinityCore/TrinityCore/commit/ca83e14f8b141fab0a13e08f48fca6c1ace0c4c7 https://github.com/TrinityCore/TrinityCore/commit/ee1c1b97be4492ecabe8b15ea6323fc37e4eaa8c https://github.com/TrinityCore/TrinityCore/commit/18e4ab6911468b829b0fc768e532a770263c3717 https://github.com/TrinityCore/TrinityCore/commit/bf37446b3c2ed73b4d3aa9e227d3eff5c53b378b https://github.com/TrinityCore/TrinityCore/commit/cb854a2b7bb7bd96cf9c4d1daf3789f797bf4db8
This commit is contained in:
1 parent
694c89d76d
commit
b3ea9fbbe5
163 files changed
+2448
-2328
No files matched your search
@@ -503,7 +503,7 @@ public:
|
||||
return false;
|
||||
|
||||
handler->PSendSysMessage("Loot recipient for creature %s (GUID %u, DB GUID %u) is %s",
|
||||
target->GetName().c_str(), target->GetGUIDLow(), target->GetDBTableGUIDLow(),
|
||||
target->GetName().c_str(), target->GetGUID().GetCounter(), target->GetSpawnId(),
|
||||
target->hasLootRecipient() ? (target->GetLootRecipient() ? target->GetLootRecipient()->GetName().c_str() : "offline") : "no loot recipient");
|
||||
return true;
|
||||
}
|
||||
@@ -598,7 +598,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("bag: %d slot: %d guid: %d - state: %s", bagSlot, item->GetSlot(), item->GetGUIDLow(), st.c_str());
|
||||
handler->PSendSysMessage("bag: %d slot: %d guid: %d - state: %s", bagSlot, item->GetSlot(), item->GetGUID().GetCounter(), st.c_str());
|
||||
}
|
||||
if (updateQueue.empty())
|
||||
handler->PSendSysMessage("The player's updatequeue is empty");
|
||||
@@ -619,7 +619,7 @@ public:
|
||||
|
||||
if (item->GetSlot() != i)
|
||||
{
|
||||
handler->PSendSysMessage("Item with slot %d and guid %d has an incorrect slot value: %d", i, item->GetGUIDLow(), item->GetSlot());
|
||||
handler->PSendSysMessage("Item with slot %d and guid %d has an incorrect slot value: %d", i, item->GetGUID().GetCounter(), item->GetSlot());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -643,28 +643,28 @@ public:
|
||||
uint16 qp = item->GetQueuePos();
|
||||
if (qp > updateQueue.size())
|
||||
{
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d has its queuepos (%d) larger than the update queue size! ", item->GetSlot(), item->GetGUIDLow(), qp);
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d has its queuepos (%d) larger than the update queue size! ", item->GetSlot(), item->GetGUID().GetCounter(), qp);
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (updateQueue[qp] == NULL)
|
||||
{
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d has its queuepos (%d) pointing to NULL in the queue!", item->GetSlot(), item->GetGUIDLow(), qp);
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d has its queuepos (%d) pointing to NULL in the queue!", item->GetSlot(), item->GetGUID().GetCounter(), qp);
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (updateQueue[qp] != item)
|
||||
{
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, guid: %d)", item->GetSlot(), item->GetGUIDLow(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUIDLow());
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, guid: %d)", item->GetSlot(), item->GetGUID().GetCounter(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUID().GetCounter());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (item->GetState() != ITEM_UNCHANGED)
|
||||
{
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d is not in queue but should be (state: %d)!", item->GetSlot(), item->GetGUIDLow(), item->GetState());
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d is not in queue but should be (state: %d)!", item->GetSlot(), item->GetGUID().GetCounter(), item->GetState());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -679,7 +679,7 @@ public:
|
||||
|
||||
if (item2->GetSlot() != j)
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d and slot %d (guid: %d) has an incorrect slot value: %d", bag->GetSlot(), j, item2->GetGUIDLow(), item2->GetSlot());
|
||||
handler->PSendSysMessage("The item in bag %d and slot %d (guid: %d) has an incorrect slot value: %d", bag->GetSlot(), j, item2->GetGUID().GetCounter(), item2->GetSlot());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -711,28 +711,28 @@ public:
|
||||
uint16 qp = item2->GetQueuePos();
|
||||
if (qp > updateQueue.size())
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) larger than the update queue size! ", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), qp);
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) larger than the update queue size! ", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().GetCounter(), qp);
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (updateQueue[qp] == NULL)
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) that points to NULL in the queue!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), qp);
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) that points to NULL in the queue!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().GetCounter(), qp);
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (updateQueue[qp] != item2)
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, guid: %d)", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUIDLow());
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, guid: %d)", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().GetCounter(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUID().GetCounter());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (item2->GetState() != ITEM_UNCHANGED)
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d is not in queue but should be (state: %d)!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), item2->GetState());
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d is not in queue but should be (state: %d)!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().GetCounter(), item2->GetState());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -807,14 +807,14 @@ public:
|
||||
ThreatContainer::StorageType const &threatList = target->getThreatManager().getThreatList();
|
||||
ThreatContainer::StorageType::const_iterator itr;
|
||||
uint32 count = 0;
|
||||
handler->PSendSysMessage("Threat list of %s (guid %u)", target->GetName().c_str(), target->GetGUIDLow());
|
||||
handler->PSendSysMessage("Threat list of %s (guid %u)", target->GetName().c_str(), target->GetGUID().GetCounter());
|
||||
for (itr = threatList.begin(); itr != threatList.end(); ++itr)
|
||||
{
|
||||
Unit* unit = (*itr)->getTarget();
|
||||
if (!unit)
|
||||
continue;
|
||||
++count;
|
||||
handler->PSendSysMessage(" %u. %s (guid %u) - threat %f", count, unit->GetName().c_str(), unit->GetGUIDLow(), (*itr)->getThreat());
|
||||
handler->PSendSysMessage(" %u. %s (guid %u) - threat %f", count, unit->GetName().c_str(), unit->GetGUID().GetCounter(), (*itr)->getThreat());
|
||||
}
|
||||
handler->SendSysMessage("End of threat list.");
|
||||
return true;
|
||||
@@ -827,13 +827,13 @@ public:
|
||||
target = handler->GetSession()->GetPlayer();
|
||||
HostileReference* ref = target->getHostileRefManager().getFirst();
|
||||
uint32 count = 0;
|
||||
handler->PSendSysMessage("Hostil reference list of %s (guid %u)", target->GetName().c_str(), target->GetGUIDLow());
|
||||
handler->PSendSysMessage("Hostil reference list of %s (guid %u)", target->GetName().c_str(), target->GetGUID().GetCounter());
|
||||
while (ref)
|
||||
{
|
||||
if (Unit* unit = ref->GetSource()->GetOwner())
|
||||
{
|
||||
++count;
|
||||
handler->PSendSysMessage(" %u. %s (guid %u) - threat %f", count, unit->GetName().c_str(), unit->GetGUIDLow(), ref->getThreat());
|
||||
handler->PSendSysMessage(" %u. %s (guid %u) - threat %f", count, unit->GetName().c_str(), unit->GetGUID().GetCounter(), ref->getThreat());
|
||||
}
|
||||
ref = ref->next();
|
||||
}
|
||||
@@ -929,8 +929,7 @@ public:
|
||||
Creature* v = new Creature();
|
||||
|
||||
Map* map = handler->GetSession()->GetPlayer()->GetMap();
|
||||
|
||||
if (!v->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_VEHICLE), map, handler->GetSession()->GetPlayer()->GetPhaseMask(), entry, x, y, z, o, nullptr, id))
|
||||
if (!v->Create(map->GenerateLowGuid<HighGuid::Vehicle>(), map, handler->GetSession()->GetPlayer()->GetPhaseMask(), entry, x, y, z, o, nullptr, id))
|
||||
{
|
||||
delete v;
|
||||
return false;
|
||||
@@ -998,7 +997,7 @@ public:
|
||||
uint32 guid = (uint32)atoi(e);
|
||||
uint32 index = (uint32)atoi(f);
|
||||
|
||||
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(ObjectGuid(HIGHGUID_ITEM, 0, guid));
|
||||
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(ObjectGuid(HighGuid::Item, 0, guid));
|
||||
|
||||
if (!i)
|
||||
return false;
|
||||
@@ -1029,7 +1028,7 @@ public:
|
||||
uint32 index = (uint32)atoi(f);
|
||||
uint32 value = (uint32)atoi(g);
|
||||
|
||||
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(ObjectGuid(HIGHGUID_ITEM, 0, guid));
|
||||
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(ObjectGuid(HighGuid::Item, 0, guid));
|
||||
|
||||
if (!i)
|
||||
return false;
|
||||
@@ -1053,7 +1052,7 @@ public:
|
||||
|
||||
uint32 guid = (uint32)atoi(e);
|
||||
|
||||
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(ObjectGuid(HIGHGUID_ITEM, guid));
|
||||
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(ObjectGuid(HighGuid::Item, guid));
|
||||
|
||||
if (!i)
|
||||
return false;
|
||||
@@ -1078,7 +1077,7 @@ public:
|
||||
static bool HandleDebugLoSCommand(ChatHandler* handler, char const* /*args*/)
|
||||
{
|
||||
if (Unit* unit = handler->getSelectedUnit())
|
||||
handler->PSendSysMessage("Unit %s (GuidLow: %u) is %sin LoS", unit->GetName().c_str(), unit->GetGUIDLow(), handler->GetSession()->GetPlayer()->IsWithinLOSInMap(unit) ? "" : "not ");
|
||||
handler->PSendSysMessage("Unit %s (GuidLow: %u) is %sin LoS", unit->GetName().c_str(), unit->GetGUID().GetCounter(), handler->GetSession()->GetPlayer()->IsWithinLOSInMap(unit) ? "" : "not ");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1223,7 +1222,7 @@ public:
|
||||
|
||||
if (opcode >= handler->GetSession()->GetPlayer()->GetValuesCount())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, opcode, handler->GetSession()->GetPlayer()->GetGUIDLow(), handler->GetSession()->GetPlayer()->GetValuesCount());
|
||||
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, opcode, handler->GetSession()->GetPlayer()->GetGUID().GetCounter(), handler->GetSession()->GetPlayer()->GetValuesCount());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1273,13 +1272,13 @@ public:
|
||||
{
|
||||
value = unit->GetUInt32Value(updateIndex);
|
||||
|
||||
handler->PSendSysMessage(LANG_UPDATE, unit->GetGUIDLow(), updateIndex, value);
|
||||
handler->PSendSysMessage(LANG_UPDATE, unit->GetGUID().GetCounter(), updateIndex, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
value = atoi(val);
|
||||
|
||||
handler->PSendSysMessage(LANG_UPDATE_CHANGE, unit->GetGUIDLow(), updateIndex, value);
|
||||
handler->PSendSysMessage(LANG_UPDATE_CHANGE, unit->GetGUID().GetCounter(), updateIndex, value);
|
||||
|
||||
unit->SetUInt32Value(updateIndex, value);
|
||||
|
||||
|
||||
Reference in new issue
Block a user