mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 08:38:20 +00:00
heading, x_pos, y_pos, and z_pos replaced with m_Position in Mob
This commit is contained in:
+21
-21
@@ -249,15 +249,15 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob (
|
||||
0, // uint8 in_qglobal,
|
||||
0, // uint8 in_maxlevel,
|
||||
0 // uint32 in_scalerate
|
||||
),
|
||||
),
|
||||
corpse_decay_timer(RuleI(Character, CorpseDecayTimeMS)),
|
||||
corpse_res_timer(RuleI(Character, CorpseResTimeMS)),
|
||||
corpse_delay_timer(RuleI(NPC, CorpseUnlockTimer)),
|
||||
corpse_graveyard_timer(RuleI(Zone, GraveyardTimeMS)),
|
||||
loot_cooldown_timer(10)
|
||||
loot_cooldown_timer(10)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
PlayerProfile_Struct *pp = &client->GetPP();
|
||||
ItemInst *item;
|
||||
|
||||
@@ -287,7 +287,7 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob (
|
||||
platinum = 0;
|
||||
|
||||
strcpy(orgname, pp->name);
|
||||
strcpy(name, pp->name);
|
||||
strcpy(name, pp->name);
|
||||
|
||||
/* become_npc was not being initialized which led to some pretty funky things with newly created corpses */
|
||||
become_npc = false;
|
||||
@@ -295,8 +295,8 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob (
|
||||
SetPKItem(0);
|
||||
|
||||
/* Check Rule to see if we can leave corpses */
|
||||
if(!RuleB(Character, LeaveNakedCorpses) ||
|
||||
RuleB(Character, LeaveCorpses) &&
|
||||
if(!RuleB(Character, LeaveNakedCorpses) ||
|
||||
RuleB(Character, LeaveCorpses) &&
|
||||
GetLevel() >= RuleI(Character, DeathItemLossLevel)) {
|
||||
// cash
|
||||
// Let's not move the cash when 'RespawnFromHover = true' && 'client->GetClientVersion() < EQClientSoF' since the client doesn't.
|
||||
@@ -589,7 +589,7 @@ bool Corpse::Save() {
|
||||
ItemList::iterator cur, end;
|
||||
cur = itemlist.begin();
|
||||
end = itemlist.end();
|
||||
for (; cur != end; ++cur) {
|
||||
for (; cur != end; ++cur) {
|
||||
ServerLootItem_Struct* item = *cur;
|
||||
item->equip_slot = ServerToCorpseSlot(item->equip_slot); // temp hack until corpse blobs are removed
|
||||
memcpy((char*)&dbpc->items[x++], (char*)item, sizeof(ServerLootItem_Struct));
|
||||
@@ -597,11 +597,11 @@ bool Corpse::Save() {
|
||||
|
||||
/* Create New Corpse*/
|
||||
if (corpse_db_id == 0) {
|
||||
corpse_db_id = database.SaveCharacterCorpse(char_id, orgname, zone->GetZoneID(), zone->GetInstanceID(), dbpc, x_pos, y_pos, z_pos, heading);
|
||||
corpse_db_id = database.SaveCharacterCorpse(char_id, orgname, zone->GetZoneID(), zone->GetInstanceID(), dbpc, m_Position.m_X, m_Position.m_Y, m_Position.m_Z, m_Position.m_Heading);
|
||||
}
|
||||
/* Update Corpse Data */
|
||||
else{
|
||||
corpse_db_id = database.UpdateCharacterCorpse(corpse_db_id, char_id, orgname, zone->GetZoneID(), zone->GetInstanceID(), dbpc, x_pos, y_pos, z_pos, heading, IsRezzed());
|
||||
corpse_db_id = database.UpdateCharacterCorpse(corpse_db_id, char_id, orgname, zone->GetZoneID(), zone->GetInstanceID(), dbpc, m_Position.m_X, m_Position.m_Y, m_Position.m_Z, m_Position.m_Heading, IsRezzed());
|
||||
}
|
||||
|
||||
safe_delete_array(dbpc);
|
||||
@@ -611,8 +611,8 @@ bool Corpse::Save() {
|
||||
|
||||
void Corpse::Delete() {
|
||||
if (IsPlayerCorpse() && corpse_db_id != 0)
|
||||
database.DeleteCharacterCorpse(corpse_db_id);
|
||||
|
||||
database.DeleteCharacterCorpse(corpse_db_id);
|
||||
|
||||
corpse_db_id = 0;
|
||||
player_corpse_depop = true;
|
||||
}
|
||||
@@ -717,7 +717,7 @@ void Corpse::RemoveItem(uint16 lootslot) {
|
||||
}
|
||||
|
||||
void Corpse::RemoveItem(ServerLootItem_Struct* item_data){
|
||||
uint8 material;
|
||||
uint8 material;
|
||||
ItemList::iterator cur,end;
|
||||
cur = itemlist.begin();
|
||||
end = itemlist.end();
|
||||
@@ -925,7 +925,7 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a
|
||||
}
|
||||
|
||||
RemoveCash();
|
||||
Save();
|
||||
Save();
|
||||
}
|
||||
|
||||
outapp->priority = 6;
|
||||
@@ -1081,7 +1081,7 @@ void Corpse::LootItem(Client* client, const EQApplicationPacket* app) {
|
||||
}
|
||||
|
||||
if (item != 0) {
|
||||
if (item_data){
|
||||
if (item_data){
|
||||
inst = database.CreateItem(item, item_data ? item_data->charges : 0, item_data->aug_1, item_data->aug_2, item_data->aug_3, item_data->aug_4, item_data->aug_5);
|
||||
}
|
||||
else {
|
||||
@@ -1156,7 +1156,7 @@ void Corpse::LootItem(Client* client, const EQApplicationPacket* app) {
|
||||
/* Delete needs to be before RemoveItem because its deletes the pointer for item_data/bag_item_data */
|
||||
database.DeleteItemOffCharacterCorpse(this->corpse_db_id, item_data->equip_slot, item_data->item_id);
|
||||
/* Delete Item Instance */
|
||||
RemoveItem(item_data->lootslot);
|
||||
RemoveItem(item_data->lootslot);
|
||||
}
|
||||
|
||||
/* Remove Bag Contents */
|
||||
@@ -1164,9 +1164,9 @@ void Corpse::LootItem(Client* client, const EQApplicationPacket* app) {
|
||||
for (int i = SUB_BEGIN; i < EmuConstants::ITEM_CONTAINER_SIZE; i++) {
|
||||
if (bag_item_data[i]) {
|
||||
/* Delete needs to be before RemoveItem because its deletes the pointer for item_data/bag_item_data */
|
||||
database.DeleteItemOffCharacterCorpse(this->corpse_db_id, bag_item_data[i]->equip_slot, bag_item_data[i]->item_id);
|
||||
database.DeleteItemOffCharacterCorpse(this->corpse_db_id, bag_item_data[i]->equip_slot, bag_item_data[i]->item_id);
|
||||
/* Delete Item Instance */
|
||||
RemoveItem(bag_item_data[i]);
|
||||
RemoveItem(bag_item_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1241,7 +1241,7 @@ void Corpse::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
|
||||
ns->spawn.NPC = 2;
|
||||
}
|
||||
|
||||
void Corpse::QueryLoot(Client* to) {
|
||||
void Corpse::QueryLoot(Client* to) {
|
||||
int x = 0, y = 0; // x = visible items, y = total items
|
||||
to->Message(0, "Coin: %ip, %ig, %is, %ic", platinum, gold, silver, copper);
|
||||
|
||||
@@ -1415,10 +1415,10 @@ void Corpse::LoadPlayerCorpseDecayTime(uint32 corpse_db_id){
|
||||
|
||||
/*
|
||||
** Corpse slot translations are needed until corpse database blobs are converted
|
||||
**
|
||||
**
|
||||
** To account for the addition of MainPowerSource, MainGeneral9 and MainGeneral10 into
|
||||
** the contiguous possessions slot enumeration, the following designations will be used:
|
||||
**
|
||||
**
|
||||
** Designatiom Server Corpse Offset
|
||||
** --------------------------------------------------
|
||||
** MainCharm 0 0 0
|
||||
@@ -1518,4 +1518,4 @@ int16 Corpse::CorpseToServerSlot(int16 corpse_slot)
|
||||
return corpse_slot;
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user