diff --git a/common/database.cpp b/common/database.cpp index 702e9a7f3..ff52a196e 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -750,61 +750,6 @@ bool Database::SaveCharacterCreate(uint32 character_id, uint32 account_id, Playe return true; } -/* This only for new Character creation storing */ -bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, EQ::InventoryProfile* inv) { - uint32 charid = 0; - char zone[50]; - float x, y, z; - charid = GetCharacterID(pp->name); - - if(!charid) { - LogError("StoreCharacter: no character id"); - return false; - } - - const char *zname = GetZoneName(pp->zone_id); - if(zname == nullptr) { - /* Zone not in the DB, something to prevent crash... */ - strn0cpy(zone, "qeynos", 49); - pp->zone_id = 1; - } - else{ strn0cpy(zone, zname, 49); } - - x = pp->x; - y = pp->y; - z = pp->z; - - /* Saves Player Profile Data */ - SaveCharacterCreate(charid, account_id, pp); - - /* Insert starting inventory... */ - std::string invquery; - for (int16 i = EQ::invslot::EQUIPMENT_BEGIN; i <= EQ::invbag::BANK_BAGS_END;) { - const EQ::ItemInstance* newinv = inv->GetItem(i); - if (newinv) { - invquery = StringFormat("INSERT INTO `inventory` (charid, slotid, itemid, charges, color) VALUES (%u, %i, %u, %i, %u)", - charid, i, newinv->GetItem()->ID, newinv->GetCharges(), newinv->GetColor()); - - auto results = QueryDatabase(invquery); - } - - if (i == EQ::invslot::slotCursor) { - i = EQ::invbag::GENERAL_BAGS_BEGIN; - continue; - } - else if (i == EQ::invbag::CURSOR_BAG_END) { - i = EQ::invslot::BANK_BEGIN; - continue; - } - else if (i == EQ::invslot::BANK_END) { - i = EQ::invbag::BANK_BAGS_BEGIN; - continue; - } - i++; - } - return true; -} - uint32 Database::GetCharacterID(const char *name) { std::string query = StringFormat("SELECT `id` FROM `character_data` WHERE `name` = '%s'", name); auto results = QueryDatabase(query); diff --git a/common/database.h b/common/database.h index 421777c9d..a7af5fc23 100644 --- a/common/database.h +++ b/common/database.h @@ -114,7 +114,6 @@ public: bool SaveCharacterCreate(uint32 character_id, uint32 account_id, PlayerProfile_Struct* pp); bool SetHackerFlag(const char* accountname, const char* charactername, const char* hacked); bool SetMQDetectionFlag(const char* accountname, const char* charactername, const char* hacked, const char* zone); - bool StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, EQ::InventoryProfile* inv); bool UpdateName(const char* oldname, const char* newname); /* General Information Queries */ diff --git a/shared_memory/main.cpp b/shared_memory/main.cpp index d9d19205b..7cf54f946 100644 --- a/shared_memory/main.cpp +++ b/shared_memory/main.cpp @@ -161,7 +161,7 @@ int main(int argc, char **argv) } } - EQEmu::InitializeDynamicLookups(); + EQ::InitializeDynamicLookups(); LogInfo("Initialized dynamic dictionary entries"); } diff --git a/world/client.cpp b/world/client.cpp index 8be1f2982..684020137 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -2078,7 +2078,7 @@ void Client::SetClassLanguages(PlayerProfile_Struct *pp) bool Client::StoreCharacter( uint32 account_id, PlayerProfile_Struct *p_player_profile_struct, - EQEmu::InventoryProfile *p_inventory_profile + EQ::InventoryProfile *p_inventory_profile ) { uint32 character_id = 0; @@ -2103,8 +2103,8 @@ bool Client::StoreCharacter( database.SaveCharacterCreate(character_id, account_id, p_player_profile_struct); std::string invquery; - for (int16 i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invbag::BANK_BAGS_END;) { - const EQEmu::ItemInstance *new_inventory_item = p_inventory_profile->GetItem(i); + for (int16 i = EQ::invslot::EQUIPMENT_BEGIN; i <= EQ::invbag::BANK_BAGS_END;) { + const EQ::ItemInstance *new_inventory_item = p_inventory_profile->GetItem(i); if (new_inventory_item) { invquery = StringFormat( "INSERT INTO `inventory` (charid, slotid, itemid, charges, color) VALUES (%u, %i, %u, %i, %u)", @@ -2118,16 +2118,16 @@ bool Client::StoreCharacter( auto results = database.QueryDatabase(invquery); } - if (i == EQEmu::invslot::slotCursor) { - i = EQEmu::invbag::GENERAL_BAGS_BEGIN; + if (i == EQ::invslot::slotCursor) { + i = EQ::invbag::GENERAL_BAGS_BEGIN; continue; } - else if (i == EQEmu::invbag::CURSOR_BAG_END) { - i = EQEmu::invslot::BANK_BEGIN; + else if (i == EQ::invbag::CURSOR_BAG_END) { + i = EQ::invslot::BANK_BEGIN; continue; } - else if (i == EQEmu::invslot::BANK_END) { - i = EQEmu::invbag::BANK_BAGS_BEGIN; + else if (i == EQ::invslot::BANK_END) { + i = EQ::invbag::BANK_BAGS_BEGIN; continue; } i++; diff --git a/world/client.h b/world/client.h index d05655d82..aca958d6f 100644 --- a/world/client.h +++ b/world/client.h @@ -75,7 +75,7 @@ public: bool StoreCharacter( uint32 account_id, PlayerProfile_Struct *p_player_profile_struct, - EQ::::InventoryProfile *p_inventory_profile + EQ::InventoryProfile *p_inventory_profile ); private: diff --git a/world/worlddb.h b/world/worlddb.h index 592e24478..42fbf96b6 100644 --- a/world/worlddb.h +++ b/world/worlddb.h @@ -42,7 +42,7 @@ public: bool StoreCharacter( uint32 account_id, PlayerProfile_Struct *p_player_profile_struct, - EQEmu::InventoryProfile *p_inventory_profile + EQ::InventoryProfile *p_inventory_profile ); private: diff --git a/zone/command.cpp b/zone/command.cpp index 14fdce983..41f691b6d 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -7438,7 +7438,7 @@ void command_itemsearch(Client *c, const Seperator *sep) std::string saylink_commands; for (auto &amount : amounts) { - saylink_commands += EQEmu::SayLinkEngine::GenerateQuestSaylink( + saylink_commands += EQ::SayLinkEngine::GenerateQuestSaylink( "#si " + std::to_string(item->ID) + " " + amount, false, "[" + amount + "] " diff --git a/zone/tradeskills.cpp b/zone/tradeskills.cpp index b3e59b9b4..307560cf4 100644 --- a/zone/tradeskills.cpp +++ b/zone/tradeskills.cpp @@ -311,7 +311,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob } container = inst; - if (container->GetItem() && container->GetItem()->BagType == EQEmu::item::BagTypeTransformationmold) { + if (container->GetItem() && container->GetItem()->BagType == EQ::item::BagTypeTransformationmold) { const EQ::ItemInstance *inst = container->GetItem(0); bool AllowAll = RuleB(Inventory, AllowAnyWeaponTransformation); if (inst && EQ::ItemInstance::CanTransform(inst->GetItem(), container->GetItem(), AllowAll)) { @@ -328,7 +328,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob inst->GetAugmentItemID(4), inst->GetAugmentItemID(5), inst->IsAttuned(), - EQEmu::invslot::slotCursor, + EQ::invslot::slotCursor, container->GetItem()->Icon, atoi(container->GetItem()->IDFile + 2) );