diff options
author | Shauren <shauren.trinity@gmail.com> | 2025-02-03 18:42:54 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2025-02-03 18:42:54 +0100 |
commit | 01132b175733ab006f6de37c7b752e0c319787be (patch) | |
tree | 3b8e7a3a49e4eeaae9a6e67e1fceeb8e68354cc1 | |
parent | 00875fe4a318780a4da095bad9a608e3e514ca82 (diff) |
Core/Misc: Reduce code differences between branches
29 files changed, 570 insertions, 554 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 5894c68df1e..7ecaf0977dc 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -122,7 +122,7 @@ ConditionMgr::ConditionTypeInfo const ConditionMgr::StaticConditionTypeData[COND }; // Checks if object meets the condition -// Can have CONDITION_SOURCE_TYPE_NONE && !mReferenceId if called from a special event (ie: eventAI) +// Can have CONDITION_SOURCE_TYPE_NONE && !mReferenceId if called from a special event (ie: SmartAI) bool Condition::Meets(ConditionSourceInfo& sourceInfo) const { ASSERT(ConditionTarget < MAX_CONDITION_TARGETS); diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 7852f71725e..544c0a61f2e 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -616,8 +616,8 @@ void LoadDBCStores(const std::string& dataPath) } // valid taxi network node - uint8 field = (uint8)((node->ID - 1) / 32); - uint32 submask = 1 << ((node->ID - 1) % 32); + uint32 field = uint32((node->ID - 1) / (sizeof(TaxiMask::value_type) * 8)); + TaxiMask::value_type submask = TaxiMask::value_type(1 << ((node->ID - 1) % (sizeof(TaxiMask::value_type) * 8))); sTaxiNodesMask[field] |= submask; if (node->MountCreatureID[0] && node->MountCreatureID[0] != 32981) diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index c491f88dbab..49363f6b1d0 100644 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -831,15 +831,15 @@ InventoryResult Item::CanBeMergedPartlyWith(ItemTemplate const* proto) const { // not allow merge looting currently items if (m_lootGenerated) - return EQUIP_ERR_ALREADY_LOOTED; + return EQUIP_ERR_LOOT_GONE; // check item type if (GetEntry() != proto->ItemId) - return EQUIP_ERR_ITEM_CANT_STACK; + return EQUIP_ERR_CANT_STACK; // check free space (full stacks can't be target of merge if (GetCount() >= proto->GetMaxStackSize()) - return EQUIP_ERR_ITEM_CANT_STACK; + return EQUIP_ERR_CANT_STACK; return EQUIP_ERR_OK; } diff --git a/src/server/game/Entities/Item/ItemDefines.h b/src/server/game/Entities/Item/ItemDefines.h index 10f5c2c46da..db5c7fd3a03 100644 --- a/src/server/game/Entities/Item/ItemDefines.h +++ b/src/server/game/Entities/Item/ItemDefines.h @@ -23,95 +23,98 @@ // EnumUtils: DESCRIBE THIS enum InventoryResult : uint8 { - EQUIP_ERR_OK = 0, - EQUIP_ERR_CANT_EQUIP_LEVEL_I = 1, - EQUIP_ERR_CANT_EQUIP_SKILL = 2, - EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT = 3, - EQUIP_ERR_BAG_FULL = 4, - EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG = 5, - EQUIP_ERR_CANT_TRADE_EQUIP_BAGS = 6, - EQUIP_ERR_ONLY_AMMO_CAN_GO_HERE = 7, - EQUIP_ERR_NO_REQUIRED_PROFICIENCY = 8, - EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE = 9, - EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM = 10, - EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM2 = 11, - EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE2 = 12, - EQUIP_ERR_CANT_EQUIP_WITH_TWOHANDED = 13, - EQUIP_ERR_CANT_DUAL_WIELD = 14, - EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG = 15, - EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2 = 16, - EQUIP_ERR_CANT_CARRY_MORE_OF_THIS = 17, - EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE3 = 18, - EQUIP_ERR_ITEM_CANT_STACK = 19, - EQUIP_ERR_ITEM_CANT_BE_EQUIPPED = 20, - EQUIP_ERR_ITEMS_CANT_BE_SWAPPED = 21, - EQUIP_ERR_SLOT_IS_EMPTY = 22, - EQUIP_ERR_ITEM_NOT_FOUND = 23, - EQUIP_ERR_CANT_DROP_SOULBOUND = 24, - EQUIP_ERR_OUT_OF_RANGE = 25, - EQUIP_ERR_TRIED_TO_SPLIT_MORE_THAN_COUNT = 26, - EQUIP_ERR_COULDNT_SPLIT_ITEMS = 27, - EQUIP_ERR_MISSING_REAGENT = 28, - EQUIP_ERR_NOT_ENOUGH_MONEY = 29, - EQUIP_ERR_NOT_A_BAG = 30, - EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS = 31, - EQUIP_ERR_DONT_OWN_THAT_ITEM = 32, - EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER = 33, - EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT = 34, - EQUIP_ERR_TOO_FAR_AWAY_FROM_BANK = 35, - EQUIP_ERR_ITEM_LOCKED = 36, - EQUIP_ERR_YOU_ARE_STUNNED = 37, - EQUIP_ERR_YOU_ARE_DEAD = 38, - EQUIP_ERR_CANT_DO_RIGHT_NOW = 39, - EQUIP_ERR_INT_BAG_ERROR = 40, - EQUIP_ERR_CAN_EQUIP_ONLY1_BOLT = 41, - EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH = 42, - EQUIP_ERR_STACKABLE_CANT_BE_WRAPPED = 43, - EQUIP_ERR_EQUIPPED_CANT_BE_WRAPPED = 44, - EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED = 45, - EQUIP_ERR_BOUND_CANT_BE_WRAPPED = 46, - EQUIP_ERR_UNIQUE_CANT_BE_WRAPPED = 47, - EQUIP_ERR_BAGS_CANT_BE_WRAPPED = 48, - EQUIP_ERR_ALREADY_LOOTED = 49, - EQUIP_ERR_INVENTORY_FULL = 50, - EQUIP_ERR_BANK_FULL = 51, - EQUIP_ERR_ITEM_IS_CURRENTLY_SOLD_OUT = 52, - EQUIP_ERR_BAG_FULL3 = 53, - EQUIP_ERR_ITEM_NOT_FOUND2 = 54, - EQUIP_ERR_ITEM_CANT_STACK2 = 55, - EQUIP_ERR_BAG_FULL4 = 56, - EQUIP_ERR_ITEM_SOLD_OUT = 57, - EQUIP_ERR_OBJECT_IS_BUSY = 58, - EQUIP_ERR_NONE = 59, - EQUIP_ERR_NOT_IN_COMBAT = 60, - EQUIP_ERR_NOT_WHILE_DISARMED = 61, - EQUIP_ERR_BAG_FULL6 = 62, - EQUIP_ERR_CANT_EQUIP_RANK = 63, - EQUIP_ERR_CANT_EQUIP_REPUTATION = 64, - EQUIP_ERR_TOO_MANY_SPECIAL_BAGS = 65, - EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW = 66, - EQUIP_ERR_ITEM_UNIQUE_EQUIPABLE = 67, - EQUIP_ERR_VENDOR_MISSING_TURNINS = 68, - EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS = 69, - EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS = 70, - EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED = 71, - EQUIP_ERR_MAIL_BOUND_ITEM = 72, - EQUIP_ERR_NO_SPLIT_WHILE_PROSPECTING = 73, - EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED = 75, - EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED = 76, - EQUIP_ERR_TOO_MUCH_GOLD = 77, - EQUIP_ERR_NOT_DURING_ARENA_MATCH = 78, - EQUIP_ERR_CANNOT_TRADE_THAT = 79, - EQUIP_ERR_PERSONAL_ARENA_RATING_TOO_LOW = 80, - EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM = 81, - EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS = 82, - // no output = 83, - EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED = 84, - EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED = 85, - EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED = 86, - EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW = 87, - EQUIP_ERR_CANT_EQUIP_NEED_TALENT = 88, - EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED = 89 + EQUIP_ERR_OK = 0, + EQUIP_ERR_CANT_EQUIP_LEVEL_I = 1, // You must reach level %d to use that item. + EQUIP_ERR_CANT_EQUIP_SKILL = 2, // You aren't skilled enough to use that item. + EQUIP_ERR_WRONG_SLOT = 3, // That item does not go in that slot. + EQUIP_ERR_BAG_FULL = 4, // That bag is full. + EQUIP_ERR_BAG_IN_BAG = 5, // Can't put non-empty bags in other bags. + EQUIP_ERR_TRADE_EQUIPPED_BAG = 6, // You can't trade equipped bags. + EQUIP_ERR_AMMO_ONLY = 7, // Only ammo can go there. + EQUIP_ERR_PROFICIENCY_NEEDED = 8, // You do not have the required proficiency for that item. + EQUIP_ERR_NO_SLOT_AVAILABLE = 9, // No equipment slot is available for that item. + EQUIP_ERR_CANT_EQUIP_EVER = 10, // You can never use that item. + EQUIP_ERR_CANT_EQUIP_EVER_2 = 11, // You can never use that item. + EQUIP_ERR_NO_SLOT_AVAILABLE_2 = 12, // No equipment slot is available for that item. + EQUIP_ERR_2HANDED_EQUIPPED = 13, // Cannot equip that with a two-handed weapon. + EQUIP_ERR_2HSKILLNOTFOUND = 14, // You cannot dual-wield + EQUIP_ERR_WRONG_BAG_TYPE = 15, // That item doesn't go in that container. + EQUIP_ERR_WRONG_BAG_TYPE_2 = 16, // That item doesn't go in that container. + EQUIP_ERR_ITEM_MAX_COUNT = 17, // You can't carry any more of those items. + EQUIP_ERR_NO_SLOT_AVAILABLE_3 = 18, // No equipment slot is available for that item. + EQUIP_ERR_CANT_STACK = 19, // This item cannot stack. + EQUIP_ERR_NOT_EQUIPPABLE = 20, // This item cannot be equipped. + EQUIP_ERR_CANT_SWAP = 21, // These items can't be swapped. + EQUIP_ERR_SLOT_EMPTY = 22, // That slot is empty. + EQUIP_ERR_ITEM_NOT_FOUND = 23, // The item was not found. + EQUIP_ERR_DROP_BOUND_ITEM = 24, // You can't drop a soulbound item. + EQUIP_ERR_OUT_OF_RANGE = 25, // Out of range. + EQUIP_ERR_TOO_FEW_TO_SPLIT = 26, // Tried to split more than number in stack. + EQUIP_ERR_SPLIT_FAILED = 27, // Couldn't split those items. + EQUIP_ERR_SPELL_FAILED_REAGENTS_GENERIC = 28, // Missing reagent + EQUIP_ERR_NOT_ENOUGH_MONEY = 29, // You don't have enough money. + EQUIP_ERR_NOT_A_BAG = 30, // Not a bag. + EQUIP_ERR_DESTROY_NONEMPTY_BAG = 31, // You can only do that with empty bags. + EQUIP_ERR_NOT_OWNER = 32, // You don't own that item. + EQUIP_ERR_ONLY_ONE_QUIVER = 33, // You can only equip one quiver. + EQUIP_ERR_NO_BANK_SLOT = 34, // You must purchase that bag slot first + EQUIP_ERR_NO_BANK_HERE = 35, // You are too far away from a bank. + EQUIP_ERR_ITEM_LOCKED = 36, // Item is locked. + EQUIP_ERR_GENERIC_STUNNED = 37, // You are stunned + EQUIP_ERR_PLAYER_DEAD = 38, // You can't do that when you're dead. + EQUIP_ERR_CLIENT_LOCKED_OUT = 39, // You can't do that right now. + EQUIP_ERR_INTERNAL_BAG_ERROR = 40, // Internal Bag Error + EQUIP_ERR_ONLY_ONE_BOLT = 41, // You can only equip one quiver. + EQUIP_ERR_ONLY_ONE_AMMO = 42, // You can only equip one ammo pouch. + EQUIP_ERR_CANT_WRAP_STACKABLE = 43, // Stackable items can't be wrapped. + EQUIP_ERR_CANT_WRAP_EQUIPPED = 44, // Equipped items can't be wrapped. + EQUIP_ERR_CANT_WRAP_WRAPPED = 45, // Wrapped items can't be wrapped. + EQUIP_ERR_CANT_WRAP_BOUND = 46, // Bound items can't be wrapped. + EQUIP_ERR_CANT_WRAP_UNIQUE = 47, // Unique items can't be wrapped. + EQUIP_ERR_CANT_WRAP_BAGS = 48, // Bags can't be wrapped. + EQUIP_ERR_LOOT_GONE = 49, // Already looted + EQUIP_ERR_INV_FULL = 50, // Inventory is full. + EQUIP_ERR_BANK_FULL = 51, // Your bank is full + EQUIP_ERR_VENDOR_SOLD_OUT = 52, // That item is currently sold out. + EQUIP_ERR_BAG_FULL_2 = 53, // That bag is full. + EQUIP_ERR_ITEM_NOT_FOUND_2 = 54, // The item was not found. + EQUIP_ERR_CANT_STACK_2 = 55, // This item cannot stack. + EQUIP_ERR_BAG_FULL_3 = 56, // That bag is full. + EQUIP_ERR_VENDOR_SOLD_OUT_2 = 57, // That item is currently sold out. + EQUIP_ERR_OBJECT_IS_BUSY = 58, // That object is busy. + EQUIP_ERR_CANT_BE_DISENCHANTED = 59, // Item cannot be disenchanted + EQUIP_ERR_NOT_IN_COMBAT = 60, // You can't do that while in combat + EQUIP_ERR_NOT_WHILE_DISARMED = 61, // You can't do that while disarmed + EQUIP_ERR_BAG_FULL_4 = 62, // That bag is full. + EQUIP_ERR_CANT_EQUIP_RANK = 63, // You don't have the required rank for that item + EQUIP_ERR_CANT_EQUIP_REPUTATION = 64, // You don't have the required reputation for that item + EQUIP_ERR_TOO_MANY_SPECIAL_BAGS = 65, // You cannot equip another bag of that type + EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW = 66, // You can't loot that item now. + EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE = 67, // You cannot equip more than one of those. + EQUIP_ERR_VENDOR_MISSING_TURNINS = 68, // You do not have the required items for that purchase + EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS = 69, // You don't have enough honor points + EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS = 70, // You don't have enough arena points + EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED = 71, // You have the maximum number of those gems in your inventory or socketed into items. + EQUIP_ERR_MAIL_BOUND_ITEM = 72, // You can't mail soulbound items. + EQUIP_ERR_INTERNAL_BAG_ERROR_2 = 73, // Internal Bag Error + EQUIP_ERR_BAG_FULL_5 = 74, // That bag is full. + EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED = 75, // You have the maximum number of those gems socketed into equipped items. + EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED = 76, // You cannot socket more than one of those gems into a single item. + EQUIP_ERR_TOO_MUCH_GOLD = 77, // At gold limit + EQUIP_ERR_NOT_DURING_ARENA_MATCH = 78, // You can't do that while in an arena match + EQUIP_ERR_TRADE_BOUND_ITEM = 79, // You can't trade a soulbound item. + EQUIP_ERR_CANT_EQUIP_RATING = 80, // You don't have the personal, team, or battleground rating required to buy that item + EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM = 81, + EQUIP_ERR_NOT_SAME_ACCOUNT = 82, // Account-bound items can only be given to your own characters. + EQUIP_ERR_NONE = 83, + EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS = 84, // You can only carry %d %s + EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED_IS = 85, // You can only equip %d |4item:items in the %s category + EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED = 86, // Your level is too high to use that item + EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW = 87, // You must reach level %d to purchase that item. + EQUIP_ERR_CANT_EQUIP_NEED_TALENT = 88, // You do not have the required talent to equip that. + EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS = 89, // You can only equip %d |4item:items in the %s category + EQUIP_ERR_SHAPESHIFT_FORM_CANNOT_EQUIP = 90, // Cannot equip item in this form + EQUIP_ERR_ITEM_INVENTORY_FULL_SATCHEL = 91, // Your inventory is full. Your satchel has been delivered to your mailbox. }; // EnumUtils: DESCRIBE THIS diff --git a/src/server/game/Entities/Item/enuminfo_ItemDefines.cpp b/src/server/game/Entities/Item/enuminfo_ItemDefines.cpp index 663161b9751..0af6cb8b37e 100644 --- a/src/server/game/Entities/Item/enuminfo_ItemDefines.cpp +++ b/src/server/game/Entities/Item/enuminfo_ItemDefines.cpp @@ -32,99 +32,103 @@ TC_API_EXPORT EnumText EnumUtils<InventoryResult>::ToString(InventoryResult valu switch (value) { case EQUIP_ERR_OK: return { "EQUIP_ERR_OK", "EQUIP_ERR_OK", "" }; - case EQUIP_ERR_CANT_EQUIP_LEVEL_I: return { "EQUIP_ERR_CANT_EQUIP_LEVEL_I", "EQUIP_ERR_CANT_EQUIP_LEVEL_I", "" }; - case EQUIP_ERR_CANT_EQUIP_SKILL: return { "EQUIP_ERR_CANT_EQUIP_SKILL", "EQUIP_ERR_CANT_EQUIP_SKILL", "" }; - case EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT: return { "EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT", "EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT", "" }; - case EQUIP_ERR_BAG_FULL: return { "EQUIP_ERR_BAG_FULL", "EQUIP_ERR_BAG_FULL", "" }; - case EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG: return { "EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG", "EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG", "" }; - case EQUIP_ERR_CANT_TRADE_EQUIP_BAGS: return { "EQUIP_ERR_CANT_TRADE_EQUIP_BAGS", "EQUIP_ERR_CANT_TRADE_EQUIP_BAGS", "" }; - case EQUIP_ERR_ONLY_AMMO_CAN_GO_HERE: return { "EQUIP_ERR_ONLY_AMMO_CAN_GO_HERE", "EQUIP_ERR_ONLY_AMMO_CAN_GO_HERE", "" }; - case EQUIP_ERR_NO_REQUIRED_PROFICIENCY: return { "EQUIP_ERR_NO_REQUIRED_PROFICIENCY", "EQUIP_ERR_NO_REQUIRED_PROFICIENCY", "" }; - case EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE: return { "EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE", "EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE", "" }; - case EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM: return { "EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM", "EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM", "" }; - case EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM2: return { "EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM2", "EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM2", "" }; - case EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE2: return { "EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE2", "EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE2", "" }; - case EQUIP_ERR_CANT_EQUIP_WITH_TWOHANDED: return { "EQUIP_ERR_CANT_EQUIP_WITH_TWOHANDED", "EQUIP_ERR_CANT_EQUIP_WITH_TWOHANDED", "" }; - case EQUIP_ERR_CANT_DUAL_WIELD: return { "EQUIP_ERR_CANT_DUAL_WIELD", "EQUIP_ERR_CANT_DUAL_WIELD", "" }; - case EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG: return { "EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG", "EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG", "" }; - case EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2: return { "EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2", "EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2", "" }; - case EQUIP_ERR_CANT_CARRY_MORE_OF_THIS: return { "EQUIP_ERR_CANT_CARRY_MORE_OF_THIS", "EQUIP_ERR_CANT_CARRY_MORE_OF_THIS", "" }; - case EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE3: return { "EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE3", "EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE3", "" }; - case EQUIP_ERR_ITEM_CANT_STACK: return { "EQUIP_ERR_ITEM_CANT_STACK", "EQUIP_ERR_ITEM_CANT_STACK", "" }; - case EQUIP_ERR_ITEM_CANT_BE_EQUIPPED: return { "EQUIP_ERR_ITEM_CANT_BE_EQUIPPED", "EQUIP_ERR_ITEM_CANT_BE_EQUIPPED", "" }; - case EQUIP_ERR_ITEMS_CANT_BE_SWAPPED: return { "EQUIP_ERR_ITEMS_CANT_BE_SWAPPED", "EQUIP_ERR_ITEMS_CANT_BE_SWAPPED", "" }; - case EQUIP_ERR_SLOT_IS_EMPTY: return { "EQUIP_ERR_SLOT_IS_EMPTY", "EQUIP_ERR_SLOT_IS_EMPTY", "" }; - case EQUIP_ERR_ITEM_NOT_FOUND: return { "EQUIP_ERR_ITEM_NOT_FOUND", "EQUIP_ERR_ITEM_NOT_FOUND", "" }; - case EQUIP_ERR_CANT_DROP_SOULBOUND: return { "EQUIP_ERR_CANT_DROP_SOULBOUND", "EQUIP_ERR_CANT_DROP_SOULBOUND", "" }; - case EQUIP_ERR_OUT_OF_RANGE: return { "EQUIP_ERR_OUT_OF_RANGE", "EQUIP_ERR_OUT_OF_RANGE", "" }; - case EQUIP_ERR_TRIED_TO_SPLIT_MORE_THAN_COUNT: return { "EQUIP_ERR_TRIED_TO_SPLIT_MORE_THAN_COUNT", "EQUIP_ERR_TRIED_TO_SPLIT_MORE_THAN_COUNT", "" }; - case EQUIP_ERR_COULDNT_SPLIT_ITEMS: return { "EQUIP_ERR_COULDNT_SPLIT_ITEMS", "EQUIP_ERR_COULDNT_SPLIT_ITEMS", "" }; - case EQUIP_ERR_MISSING_REAGENT: return { "EQUIP_ERR_MISSING_REAGENT", "EQUIP_ERR_MISSING_REAGENT", "" }; - case EQUIP_ERR_NOT_ENOUGH_MONEY: return { "EQUIP_ERR_NOT_ENOUGH_MONEY", "EQUIP_ERR_NOT_ENOUGH_MONEY", "" }; - case EQUIP_ERR_NOT_A_BAG: return { "EQUIP_ERR_NOT_A_BAG", "EQUIP_ERR_NOT_A_BAG", "" }; - case EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS: return { "EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS", "EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS", "" }; - case EQUIP_ERR_DONT_OWN_THAT_ITEM: return { "EQUIP_ERR_DONT_OWN_THAT_ITEM", "EQUIP_ERR_DONT_OWN_THAT_ITEM", "" }; - case EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER: return { "EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER", "EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER", "" }; - case EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT: return { "EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT", "EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT", "" }; - case EQUIP_ERR_TOO_FAR_AWAY_FROM_BANK: return { "EQUIP_ERR_TOO_FAR_AWAY_FROM_BANK", "EQUIP_ERR_TOO_FAR_AWAY_FROM_BANK", "" }; - case EQUIP_ERR_ITEM_LOCKED: return { "EQUIP_ERR_ITEM_LOCKED", "EQUIP_ERR_ITEM_LOCKED", "" }; - case EQUIP_ERR_YOU_ARE_STUNNED: return { "EQUIP_ERR_YOU_ARE_STUNNED", "EQUIP_ERR_YOU_ARE_STUNNED", "" }; - case EQUIP_ERR_YOU_ARE_DEAD: return { "EQUIP_ERR_YOU_ARE_DEAD", "EQUIP_ERR_YOU_ARE_DEAD", "" }; - case EQUIP_ERR_CANT_DO_RIGHT_NOW: return { "EQUIP_ERR_CANT_DO_RIGHT_NOW", "EQUIP_ERR_CANT_DO_RIGHT_NOW", "" }; - case EQUIP_ERR_INT_BAG_ERROR: return { "EQUIP_ERR_INT_BAG_ERROR", "EQUIP_ERR_INT_BAG_ERROR", "" }; - case EQUIP_ERR_CAN_EQUIP_ONLY1_BOLT: return { "EQUIP_ERR_CAN_EQUIP_ONLY1_BOLT", "EQUIP_ERR_CAN_EQUIP_ONLY1_BOLT", "" }; - case EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH: return { "EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH", "EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH", "" }; - case EQUIP_ERR_STACKABLE_CANT_BE_WRAPPED: return { "EQUIP_ERR_STACKABLE_CANT_BE_WRAPPED", "EQUIP_ERR_STACKABLE_CANT_BE_WRAPPED", "" }; - case EQUIP_ERR_EQUIPPED_CANT_BE_WRAPPED: return { "EQUIP_ERR_EQUIPPED_CANT_BE_WRAPPED", "EQUIP_ERR_EQUIPPED_CANT_BE_WRAPPED", "" }; - case EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED: return { "EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED", "EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED", "" }; - case EQUIP_ERR_BOUND_CANT_BE_WRAPPED: return { "EQUIP_ERR_BOUND_CANT_BE_WRAPPED", "EQUIP_ERR_BOUND_CANT_BE_WRAPPED", "" }; - case EQUIP_ERR_UNIQUE_CANT_BE_WRAPPED: return { "EQUIP_ERR_UNIQUE_CANT_BE_WRAPPED", "EQUIP_ERR_UNIQUE_CANT_BE_WRAPPED", "" }; - case EQUIP_ERR_BAGS_CANT_BE_WRAPPED: return { "EQUIP_ERR_BAGS_CANT_BE_WRAPPED", "EQUIP_ERR_BAGS_CANT_BE_WRAPPED", "" }; - case EQUIP_ERR_ALREADY_LOOTED: return { "EQUIP_ERR_ALREADY_LOOTED", "EQUIP_ERR_ALREADY_LOOTED", "" }; - case EQUIP_ERR_INVENTORY_FULL: return { "EQUIP_ERR_INVENTORY_FULL", "EQUIP_ERR_INVENTORY_FULL", "" }; - case EQUIP_ERR_BANK_FULL: return { "EQUIP_ERR_BANK_FULL", "EQUIP_ERR_BANK_FULL", "" }; - case EQUIP_ERR_ITEM_IS_CURRENTLY_SOLD_OUT: return { "EQUIP_ERR_ITEM_IS_CURRENTLY_SOLD_OUT", "EQUIP_ERR_ITEM_IS_CURRENTLY_SOLD_OUT", "" }; - case EQUIP_ERR_BAG_FULL3: return { "EQUIP_ERR_BAG_FULL3", "EQUIP_ERR_BAG_FULL3", "" }; - case EQUIP_ERR_ITEM_NOT_FOUND2: return { "EQUIP_ERR_ITEM_NOT_FOUND2", "EQUIP_ERR_ITEM_NOT_FOUND2", "" }; - case EQUIP_ERR_ITEM_CANT_STACK2: return { "EQUIP_ERR_ITEM_CANT_STACK2", "EQUIP_ERR_ITEM_CANT_STACK2", "" }; - case EQUIP_ERR_BAG_FULL4: return { "EQUIP_ERR_BAG_FULL4", "EQUIP_ERR_BAG_FULL4", "" }; - case EQUIP_ERR_ITEM_SOLD_OUT: return { "EQUIP_ERR_ITEM_SOLD_OUT", "EQUIP_ERR_ITEM_SOLD_OUT", "" }; - case EQUIP_ERR_OBJECT_IS_BUSY: return { "EQUIP_ERR_OBJECT_IS_BUSY", "EQUIP_ERR_OBJECT_IS_BUSY", "" }; - case EQUIP_ERR_NONE: return { "EQUIP_ERR_NONE", "EQUIP_ERR_NONE", "" }; - case EQUIP_ERR_NOT_IN_COMBAT: return { "EQUIP_ERR_NOT_IN_COMBAT", "EQUIP_ERR_NOT_IN_COMBAT", "" }; - case EQUIP_ERR_NOT_WHILE_DISARMED: return { "EQUIP_ERR_NOT_WHILE_DISARMED", "EQUIP_ERR_NOT_WHILE_DISARMED", "" }; - case EQUIP_ERR_BAG_FULL6: return { "EQUIP_ERR_BAG_FULL6", "EQUIP_ERR_BAG_FULL6", "" }; - case EQUIP_ERR_CANT_EQUIP_RANK: return { "EQUIP_ERR_CANT_EQUIP_RANK", "EQUIP_ERR_CANT_EQUIP_RANK", "" }; - case EQUIP_ERR_CANT_EQUIP_REPUTATION: return { "EQUIP_ERR_CANT_EQUIP_REPUTATION", "EQUIP_ERR_CANT_EQUIP_REPUTATION", "" }; - case EQUIP_ERR_TOO_MANY_SPECIAL_BAGS: return { "EQUIP_ERR_TOO_MANY_SPECIAL_BAGS", "EQUIP_ERR_TOO_MANY_SPECIAL_BAGS", "" }; - case EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW: return { "EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW", "EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW", "" }; - case EQUIP_ERR_ITEM_UNIQUE_EQUIPABLE: return { "EQUIP_ERR_ITEM_UNIQUE_EQUIPABLE", "EQUIP_ERR_ITEM_UNIQUE_EQUIPABLE", "" }; - case EQUIP_ERR_VENDOR_MISSING_TURNINS: return { "EQUIP_ERR_VENDOR_MISSING_TURNINS", "EQUIP_ERR_VENDOR_MISSING_TURNINS", "" }; - case EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS: return { "EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS", "EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS", "" }; - case EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS: return { "EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS", "EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS", "" }; - case EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED: return { "EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED", "EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED", "" }; - case EQUIP_ERR_MAIL_BOUND_ITEM: return { "EQUIP_ERR_MAIL_BOUND_ITEM", "EQUIP_ERR_MAIL_BOUND_ITEM", "" }; - case EQUIP_ERR_NO_SPLIT_WHILE_PROSPECTING: return { "EQUIP_ERR_NO_SPLIT_WHILE_PROSPECTING", "EQUIP_ERR_NO_SPLIT_WHILE_PROSPECTING", "" }; - case EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED: return { "EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED", "EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED", "" }; - case EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED: return { "EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED", "EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED", "" }; - case EQUIP_ERR_TOO_MUCH_GOLD: return { "EQUIP_ERR_TOO_MUCH_GOLD", "EQUIP_ERR_TOO_MUCH_GOLD", "" }; - case EQUIP_ERR_NOT_DURING_ARENA_MATCH: return { "EQUIP_ERR_NOT_DURING_ARENA_MATCH", "EQUIP_ERR_NOT_DURING_ARENA_MATCH", "" }; - case EQUIP_ERR_CANNOT_TRADE_THAT: return { "EQUIP_ERR_CANNOT_TRADE_THAT", "EQUIP_ERR_CANNOT_TRADE_THAT", "" }; - case EQUIP_ERR_PERSONAL_ARENA_RATING_TOO_LOW: return { "EQUIP_ERR_PERSONAL_ARENA_RATING_TOO_LOW", "EQUIP_ERR_PERSONAL_ARENA_RATING_TOO_LOW", "" }; + case EQUIP_ERR_CANT_EQUIP_LEVEL_I: return { "EQUIP_ERR_CANT_EQUIP_LEVEL_I", "EQUIP_ERR_CANT_EQUIP_LEVEL_I", "You must reach level %d to use that item." }; + case EQUIP_ERR_CANT_EQUIP_SKILL: return { "EQUIP_ERR_CANT_EQUIP_SKILL", "EQUIP_ERR_CANT_EQUIP_SKILL", "You aren't skilled enough to use that item." }; + case EQUIP_ERR_WRONG_SLOT: return { "EQUIP_ERR_WRONG_SLOT", "EQUIP_ERR_WRONG_SLOT", "That item does not go in that slot." }; + case EQUIP_ERR_BAG_FULL: return { "EQUIP_ERR_BAG_FULL", "EQUIP_ERR_BAG_FULL", "That bag is full." }; + case EQUIP_ERR_BAG_IN_BAG: return { "EQUIP_ERR_BAG_IN_BAG", "EQUIP_ERR_BAG_IN_BAG", "Can't put non-empty bags in other bags." }; + case EQUIP_ERR_TRADE_EQUIPPED_BAG: return { "EQUIP_ERR_TRADE_EQUIPPED_BAG", "EQUIP_ERR_TRADE_EQUIPPED_BAG", "You can't trade equipped bags." }; + case EQUIP_ERR_AMMO_ONLY: return { "EQUIP_ERR_AMMO_ONLY", "EQUIP_ERR_AMMO_ONLY", "Only ammo can go there." }; + case EQUIP_ERR_PROFICIENCY_NEEDED: return { "EQUIP_ERR_PROFICIENCY_NEEDED", "EQUIP_ERR_PROFICIENCY_NEEDED", "You do not have the required proficiency for that item." }; + case EQUIP_ERR_NO_SLOT_AVAILABLE: return { "EQUIP_ERR_NO_SLOT_AVAILABLE", "EQUIP_ERR_NO_SLOT_AVAILABLE", "No equipment slot is available for that item." }; + case EQUIP_ERR_CANT_EQUIP_EVER: return { "EQUIP_ERR_CANT_EQUIP_EVER", "EQUIP_ERR_CANT_EQUIP_EVER", "You can never use that item." }; + case EQUIP_ERR_CANT_EQUIP_EVER_2: return { "EQUIP_ERR_CANT_EQUIP_EVER_2", "EQUIP_ERR_CANT_EQUIP_EVER_2", "You can never use that item." }; + case EQUIP_ERR_NO_SLOT_AVAILABLE_2: return { "EQUIP_ERR_NO_SLOT_AVAILABLE_2", "EQUIP_ERR_NO_SLOT_AVAILABLE_2", "No equipment slot is available for that item." }; + case EQUIP_ERR_2HANDED_EQUIPPED: return { "EQUIP_ERR_2HANDED_EQUIPPED", "EQUIP_ERR_2HANDED_EQUIPPED", "Cannot equip that with a two-handed weapon." }; + case EQUIP_ERR_2HSKILLNOTFOUND: return { "EQUIP_ERR_2HSKILLNOTFOUND", "EQUIP_ERR_2HSKILLNOTFOUND", "You cannot dual-wield" }; + case EQUIP_ERR_WRONG_BAG_TYPE: return { "EQUIP_ERR_WRONG_BAG_TYPE", "EQUIP_ERR_WRONG_BAG_TYPE", "That item doesn't go in that container." }; + case EQUIP_ERR_WRONG_BAG_TYPE_2: return { "EQUIP_ERR_WRONG_BAG_TYPE_2", "EQUIP_ERR_WRONG_BAG_TYPE_2", "That item doesn't go in that container." }; + case EQUIP_ERR_ITEM_MAX_COUNT: return { "EQUIP_ERR_ITEM_MAX_COUNT", "EQUIP_ERR_ITEM_MAX_COUNT", "You can't carry any more of those items." }; + case EQUIP_ERR_NO_SLOT_AVAILABLE_3: return { "EQUIP_ERR_NO_SLOT_AVAILABLE_3", "EQUIP_ERR_NO_SLOT_AVAILABLE_3", "No equipment slot is available for that item." }; + case EQUIP_ERR_CANT_STACK: return { "EQUIP_ERR_CANT_STACK", "EQUIP_ERR_CANT_STACK", "This item cannot stack." }; + case EQUIP_ERR_NOT_EQUIPPABLE: return { "EQUIP_ERR_NOT_EQUIPPABLE", "EQUIP_ERR_NOT_EQUIPPABLE", "This item cannot be equipped." }; + case EQUIP_ERR_CANT_SWAP: return { "EQUIP_ERR_CANT_SWAP", "EQUIP_ERR_CANT_SWAP", "These items can't be swapped." }; + case EQUIP_ERR_SLOT_EMPTY: return { "EQUIP_ERR_SLOT_EMPTY", "EQUIP_ERR_SLOT_EMPTY", "That slot is empty." }; + case EQUIP_ERR_ITEM_NOT_FOUND: return { "EQUIP_ERR_ITEM_NOT_FOUND", "EQUIP_ERR_ITEM_NOT_FOUND", "The item was not found." }; + case EQUIP_ERR_DROP_BOUND_ITEM: return { "EQUIP_ERR_DROP_BOUND_ITEM", "EQUIP_ERR_DROP_BOUND_ITEM", "You can't drop a soulbound item." }; + case EQUIP_ERR_OUT_OF_RANGE: return { "EQUIP_ERR_OUT_OF_RANGE", "EQUIP_ERR_OUT_OF_RANGE", "Out of range." }; + case EQUIP_ERR_TOO_FEW_TO_SPLIT: return { "EQUIP_ERR_TOO_FEW_TO_SPLIT", "EQUIP_ERR_TOO_FEW_TO_SPLIT", "Tried to split more than number in stack." }; + case EQUIP_ERR_SPLIT_FAILED: return { "EQUIP_ERR_SPLIT_FAILED", "EQUIP_ERR_SPLIT_FAILED", "Couldn't split those items." }; + case EQUIP_ERR_SPELL_FAILED_REAGENTS_GENERIC: return { "EQUIP_ERR_SPELL_FAILED_REAGENTS_GENERIC", "EQUIP_ERR_SPELL_FAILED_REAGENTS_GENERIC", "Missing reagent" }; + case EQUIP_ERR_NOT_ENOUGH_MONEY: return { "EQUIP_ERR_NOT_ENOUGH_MONEY", "EQUIP_ERR_NOT_ENOUGH_MONEY", "You don't have enough money." }; + case EQUIP_ERR_NOT_A_BAG: return { "EQUIP_ERR_NOT_A_BAG", "EQUIP_ERR_NOT_A_BAG", "Not a bag." }; + case EQUIP_ERR_DESTROY_NONEMPTY_BAG: return { "EQUIP_ERR_DESTROY_NONEMPTY_BAG", "EQUIP_ERR_DESTROY_NONEMPTY_BAG", "You can only do that with empty bags." }; + case EQUIP_ERR_NOT_OWNER: return { "EQUIP_ERR_NOT_OWNER", "EQUIP_ERR_NOT_OWNER", "You don't own that item." }; + case EQUIP_ERR_ONLY_ONE_QUIVER: return { "EQUIP_ERR_ONLY_ONE_QUIVER", "EQUIP_ERR_ONLY_ONE_QUIVER", "You can only equip one quiver." }; + case EQUIP_ERR_NO_BANK_SLOT: return { "EQUIP_ERR_NO_BANK_SLOT", "EQUIP_ERR_NO_BANK_SLOT", "You must purchase that bag slot first" }; + case EQUIP_ERR_NO_BANK_HERE: return { "EQUIP_ERR_NO_BANK_HERE", "EQUIP_ERR_NO_BANK_HERE", "You are too far away from a bank." }; + case EQUIP_ERR_ITEM_LOCKED: return { "EQUIP_ERR_ITEM_LOCKED", "EQUIP_ERR_ITEM_LOCKED", "Item is locked." }; + case EQUIP_ERR_GENERIC_STUNNED: return { "EQUIP_ERR_GENERIC_STUNNED", "EQUIP_ERR_GENERIC_STUNNED", "You are stunned" }; + case EQUIP_ERR_PLAYER_DEAD: return { "EQUIP_ERR_PLAYER_DEAD", "EQUIP_ERR_PLAYER_DEAD", "You can't do that when you're dead." }; + case EQUIP_ERR_CLIENT_LOCKED_OUT: return { "EQUIP_ERR_CLIENT_LOCKED_OUT", "EQUIP_ERR_CLIENT_LOCKED_OUT", "You can't do that right now." }; + case EQUIP_ERR_INTERNAL_BAG_ERROR: return { "EQUIP_ERR_INTERNAL_BAG_ERROR", "EQUIP_ERR_INTERNAL_BAG_ERROR", "Internal Bag Error" }; + case EQUIP_ERR_ONLY_ONE_BOLT: return { "EQUIP_ERR_ONLY_ONE_BOLT", "EQUIP_ERR_ONLY_ONE_BOLT", "You can only equip one quiver." }; + case EQUIP_ERR_ONLY_ONE_AMMO: return { "EQUIP_ERR_ONLY_ONE_AMMO", "EQUIP_ERR_ONLY_ONE_AMMO", "You can only equip one ammo pouch." }; + case EQUIP_ERR_CANT_WRAP_STACKABLE: return { "EQUIP_ERR_CANT_WRAP_STACKABLE", "EQUIP_ERR_CANT_WRAP_STACKABLE", "Stackable items can't be wrapped." }; + case EQUIP_ERR_CANT_WRAP_EQUIPPED: return { "EQUIP_ERR_CANT_WRAP_EQUIPPED", "EQUIP_ERR_CANT_WRAP_EQUIPPED", "Equipped items can't be wrapped." }; + case EQUIP_ERR_CANT_WRAP_WRAPPED: return { "EQUIP_ERR_CANT_WRAP_WRAPPED", "EQUIP_ERR_CANT_WRAP_WRAPPED", "Wrapped items can't be wrapped." }; + case EQUIP_ERR_CANT_WRAP_BOUND: return { "EQUIP_ERR_CANT_WRAP_BOUND", "EQUIP_ERR_CANT_WRAP_BOUND", "Bound items can't be wrapped." }; + case EQUIP_ERR_CANT_WRAP_UNIQUE: return { "EQUIP_ERR_CANT_WRAP_UNIQUE", "EQUIP_ERR_CANT_WRAP_UNIQUE", "Unique items can't be wrapped." }; + case EQUIP_ERR_CANT_WRAP_BAGS: return { "EQUIP_ERR_CANT_WRAP_BAGS", "EQUIP_ERR_CANT_WRAP_BAGS", "Bags can't be wrapped." }; + case EQUIP_ERR_LOOT_GONE: return { "EQUIP_ERR_LOOT_GONE", "EQUIP_ERR_LOOT_GONE", "Already looted" }; + case EQUIP_ERR_INV_FULL: return { "EQUIP_ERR_INV_FULL", "EQUIP_ERR_INV_FULL", "Inventory is full." }; + case EQUIP_ERR_BANK_FULL: return { "EQUIP_ERR_BANK_FULL", "EQUIP_ERR_BANK_FULL", "Your bank is full" }; + case EQUIP_ERR_VENDOR_SOLD_OUT: return { "EQUIP_ERR_VENDOR_SOLD_OUT", "EQUIP_ERR_VENDOR_SOLD_OUT", "That item is currently sold out." }; + case EQUIP_ERR_BAG_FULL_2: return { "EQUIP_ERR_BAG_FULL_2", "EQUIP_ERR_BAG_FULL_2", "That bag is full." }; + case EQUIP_ERR_ITEM_NOT_FOUND_2: return { "EQUIP_ERR_ITEM_NOT_FOUND_2", "EQUIP_ERR_ITEM_NOT_FOUND_2", "The item was not found." }; + case EQUIP_ERR_CANT_STACK_2: return { "EQUIP_ERR_CANT_STACK_2", "EQUIP_ERR_CANT_STACK_2", "This item cannot stack." }; + case EQUIP_ERR_BAG_FULL_3: return { "EQUIP_ERR_BAG_FULL_3", "EQUIP_ERR_BAG_FULL_3", "That bag is full." }; + case EQUIP_ERR_VENDOR_SOLD_OUT_2: return { "EQUIP_ERR_VENDOR_SOLD_OUT_2", "EQUIP_ERR_VENDOR_SOLD_OUT_2", "That item is currently sold out." }; + case EQUIP_ERR_OBJECT_IS_BUSY: return { "EQUIP_ERR_OBJECT_IS_BUSY", "EQUIP_ERR_OBJECT_IS_BUSY", "That object is busy." }; + case EQUIP_ERR_CANT_BE_DISENCHANTED: return { "EQUIP_ERR_CANT_BE_DISENCHANTED", "EQUIP_ERR_CANT_BE_DISENCHANTED", "Item cannot be disenchanted" }; + case EQUIP_ERR_NOT_IN_COMBAT: return { "EQUIP_ERR_NOT_IN_COMBAT", "EQUIP_ERR_NOT_IN_COMBAT", "You can't do that while in combat" }; + case EQUIP_ERR_NOT_WHILE_DISARMED: return { "EQUIP_ERR_NOT_WHILE_DISARMED", "EQUIP_ERR_NOT_WHILE_DISARMED", "You can't do that while disarmed" }; + case EQUIP_ERR_BAG_FULL_4: return { "EQUIP_ERR_BAG_FULL_4", "EQUIP_ERR_BAG_FULL_4", "That bag is full." }; + case EQUIP_ERR_CANT_EQUIP_RANK: return { "EQUIP_ERR_CANT_EQUIP_RANK", "EQUIP_ERR_CANT_EQUIP_RANK", "You don't have the required rank for that item" }; + case EQUIP_ERR_CANT_EQUIP_REPUTATION: return { "EQUIP_ERR_CANT_EQUIP_REPUTATION", "EQUIP_ERR_CANT_EQUIP_REPUTATION", "You don't have the required reputation for that item" }; + case EQUIP_ERR_TOO_MANY_SPECIAL_BAGS: return { "EQUIP_ERR_TOO_MANY_SPECIAL_BAGS", "EQUIP_ERR_TOO_MANY_SPECIAL_BAGS", "You cannot equip another bag of that type" }; + case EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW: return { "EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW", "EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW", "You can't loot that item now." }; + case EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE: return { "EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE", "EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE", "You cannot equip more than one of those." }; + case EQUIP_ERR_VENDOR_MISSING_TURNINS: return { "EQUIP_ERR_VENDOR_MISSING_TURNINS", "EQUIP_ERR_VENDOR_MISSING_TURNINS", "You do not have the required items for that purchase" }; + case EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS: return { "EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS", "EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS", "You don't have enough honor points" }; + case EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS: return { "EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS", "EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS", "You don't have enough arena points" }; + case EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED: return { "EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED", "EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED", "You have the maximum number of those gems in your inventory or socketed into items." }; + case EQUIP_ERR_MAIL_BOUND_ITEM: return { "EQUIP_ERR_MAIL_BOUND_ITEM", "EQUIP_ERR_MAIL_BOUND_ITEM", "You can't mail soulbound items." }; + case EQUIP_ERR_INTERNAL_BAG_ERROR_2: return { "EQUIP_ERR_INTERNAL_BAG_ERROR_2", "EQUIP_ERR_INTERNAL_BAG_ERROR_2", "Internal Bag Error" }; + case EQUIP_ERR_BAG_FULL_5: return { "EQUIP_ERR_BAG_FULL_5", "EQUIP_ERR_BAG_FULL_5", "That bag is full." }; + case EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED: return { "EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED", "EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED", "You have the maximum number of those gems socketed into equipped items." }; + case EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED: return { "EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED", "EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED", "You cannot socket more than one of those gems into a single item." }; + case EQUIP_ERR_TOO_MUCH_GOLD: return { "EQUIP_ERR_TOO_MUCH_GOLD", "EQUIP_ERR_TOO_MUCH_GOLD", "At gold limit" }; + case EQUIP_ERR_NOT_DURING_ARENA_MATCH: return { "EQUIP_ERR_NOT_DURING_ARENA_MATCH", "EQUIP_ERR_NOT_DURING_ARENA_MATCH", "You can't do that while in an arena match" }; + case EQUIP_ERR_TRADE_BOUND_ITEM: return { "EQUIP_ERR_TRADE_BOUND_ITEM", "EQUIP_ERR_TRADE_BOUND_ITEM", "You can't trade a soulbound item." }; + case EQUIP_ERR_CANT_EQUIP_RATING: return { "EQUIP_ERR_CANT_EQUIP_RATING", "EQUIP_ERR_CANT_EQUIP_RATING", "You don't have the personal, team, or battleground rating required to buy that item" }; case EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM: return { "EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM", "EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM", "" }; - case EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS: return { "EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS", "EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS", "" }; - case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED: return { "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED", "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED", "" }; - case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED: return { "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED", "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED", "" }; - case EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED: return { "EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED", "EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED", "" }; - case EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW: return { "EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW", "EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW", "" }; - case EQUIP_ERR_CANT_EQUIP_NEED_TALENT: return { "EQUIP_ERR_CANT_EQUIP_NEED_TALENT", "EQUIP_ERR_CANT_EQUIP_NEED_TALENT", "" }; - case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED: return { "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED", "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED", "" }; + case EQUIP_ERR_NOT_SAME_ACCOUNT: return { "EQUIP_ERR_NOT_SAME_ACCOUNT", "EQUIP_ERR_NOT_SAME_ACCOUNT", "Account-bound items can only be given to your own characters." }; + case EQUIP_ERR_NONE: return { "EQUIP_ERR_NONE", "EQUIP_ERR_NONE", "" }; + case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS: return { "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS", "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS", "You can only carry %d %s" }; + case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED_IS: return { "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED_IS", "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED_IS", "You can only equip %d |4item:items in the %s category" }; + case EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED: return { "EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED", "EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED", "Your level is too high to use that item" }; + case EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW: return { "EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW", "EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW", "You must reach level %d to purchase that item." }; + case EQUIP_ERR_CANT_EQUIP_NEED_TALENT: return { "EQUIP_ERR_CANT_EQUIP_NEED_TALENT", "EQUIP_ERR_CANT_EQUIP_NEED_TALENT", "You do not have the required talent to equip that." }; + case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS: return { "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS", "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS", "You can only equip %d |4item:items in the %s category" }; + case EQUIP_ERR_SHAPESHIFT_FORM_CANNOT_EQUIP: return { "EQUIP_ERR_SHAPESHIFT_FORM_CANNOT_EQUIP", "EQUIP_ERR_SHAPESHIFT_FORM_CANNOT_EQUIP", "Cannot equip item in this form" }; + case EQUIP_ERR_ITEM_INVENTORY_FULL_SATCHEL: return { "EQUIP_ERR_ITEM_INVENTORY_FULL_SATCHEL", "EQUIP_ERR_ITEM_INVENTORY_FULL_SATCHEL", "Your inventory is full. Your satchel has been delivered to your mailbox." }; default: throw std::out_of_range("value"); } } template <> -TC_API_EXPORT size_t EnumUtils<InventoryResult>::Count() { return 88; } +TC_API_EXPORT size_t EnumUtils<InventoryResult>::Count() { return 92; } template <> TC_API_EXPORT InventoryResult EnumUtils<InventoryResult>::FromIndex(size_t index) @@ -134,91 +138,95 @@ TC_API_EXPORT InventoryResult EnumUtils<InventoryResult>::FromIndex(size_t index case 0: return EQUIP_ERR_OK; case 1: return EQUIP_ERR_CANT_EQUIP_LEVEL_I; case 2: return EQUIP_ERR_CANT_EQUIP_SKILL; - case 3: return EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT; + case 3: return EQUIP_ERR_WRONG_SLOT; case 4: return EQUIP_ERR_BAG_FULL; - case 5: return EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG; - case 6: return EQUIP_ERR_CANT_TRADE_EQUIP_BAGS; - case 7: return EQUIP_ERR_ONLY_AMMO_CAN_GO_HERE; - case 8: return EQUIP_ERR_NO_REQUIRED_PROFICIENCY; - case 9: return EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE; - case 10: return EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM; - case 11: return EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM2; - case 12: return EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE2; - case 13: return EQUIP_ERR_CANT_EQUIP_WITH_TWOHANDED; - case 14: return EQUIP_ERR_CANT_DUAL_WIELD; - case 15: return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; - case 16: return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2; - case 17: return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; - case 18: return EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE3; - case 19: return EQUIP_ERR_ITEM_CANT_STACK; - case 20: return EQUIP_ERR_ITEM_CANT_BE_EQUIPPED; - case 21: return EQUIP_ERR_ITEMS_CANT_BE_SWAPPED; - case 22: return EQUIP_ERR_SLOT_IS_EMPTY; + case 5: return EQUIP_ERR_BAG_IN_BAG; + case 6: return EQUIP_ERR_TRADE_EQUIPPED_BAG; + case 7: return EQUIP_ERR_AMMO_ONLY; + case 8: return EQUIP_ERR_PROFICIENCY_NEEDED; + case 9: return EQUIP_ERR_NO_SLOT_AVAILABLE; + case 10: return EQUIP_ERR_CANT_EQUIP_EVER; + case 11: return EQUIP_ERR_CANT_EQUIP_EVER_2; + case 12: return EQUIP_ERR_NO_SLOT_AVAILABLE_2; + case 13: return EQUIP_ERR_2HANDED_EQUIPPED; + case 14: return EQUIP_ERR_2HSKILLNOTFOUND; + case 15: return EQUIP_ERR_WRONG_BAG_TYPE; + case 16: return EQUIP_ERR_WRONG_BAG_TYPE_2; + case 17: return EQUIP_ERR_ITEM_MAX_COUNT; + case 18: return EQUIP_ERR_NO_SLOT_AVAILABLE_3; + case 19: return EQUIP_ERR_CANT_STACK; + case 20: return EQUIP_ERR_NOT_EQUIPPABLE; + case 21: return EQUIP_ERR_CANT_SWAP; + case 22: return EQUIP_ERR_SLOT_EMPTY; case 23: return EQUIP_ERR_ITEM_NOT_FOUND; - case 24: return EQUIP_ERR_CANT_DROP_SOULBOUND; + case 24: return EQUIP_ERR_DROP_BOUND_ITEM; case 25: return EQUIP_ERR_OUT_OF_RANGE; - case 26: return EQUIP_ERR_TRIED_TO_SPLIT_MORE_THAN_COUNT; - case 27: return EQUIP_ERR_COULDNT_SPLIT_ITEMS; - case 28: return EQUIP_ERR_MISSING_REAGENT; + case 26: return EQUIP_ERR_TOO_FEW_TO_SPLIT; + case 27: return EQUIP_ERR_SPLIT_FAILED; + case 28: return EQUIP_ERR_SPELL_FAILED_REAGENTS_GENERIC; case 29: return EQUIP_ERR_NOT_ENOUGH_MONEY; case 30: return EQUIP_ERR_NOT_A_BAG; - case 31: return EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS; - case 32: return EQUIP_ERR_DONT_OWN_THAT_ITEM; - case 33: return EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER; - case 34: return EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT; - case 35: return EQUIP_ERR_TOO_FAR_AWAY_FROM_BANK; + case 31: return EQUIP_ERR_DESTROY_NONEMPTY_BAG; + case 32: return EQUIP_ERR_NOT_OWNER; + case 33: return EQUIP_ERR_ONLY_ONE_QUIVER; + case 34: return EQUIP_ERR_NO_BANK_SLOT; + case 35: return EQUIP_ERR_NO_BANK_HERE; case 36: return EQUIP_ERR_ITEM_LOCKED; - case 37: return EQUIP_ERR_YOU_ARE_STUNNED; - case 38: return EQUIP_ERR_YOU_ARE_DEAD; - case 39: return EQUIP_ERR_CANT_DO_RIGHT_NOW; - case 40: return EQUIP_ERR_INT_BAG_ERROR; - case 41: return EQUIP_ERR_CAN_EQUIP_ONLY1_BOLT; - case 42: return EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH; - case 43: return EQUIP_ERR_STACKABLE_CANT_BE_WRAPPED; - case 44: return EQUIP_ERR_EQUIPPED_CANT_BE_WRAPPED; - case 45: return EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED; - case 46: return EQUIP_ERR_BOUND_CANT_BE_WRAPPED; - case 47: return EQUIP_ERR_UNIQUE_CANT_BE_WRAPPED; - case 48: return EQUIP_ERR_BAGS_CANT_BE_WRAPPED; - case 49: return EQUIP_ERR_ALREADY_LOOTED; - case 50: return EQUIP_ERR_INVENTORY_FULL; + case 37: return EQUIP_ERR_GENERIC_STUNNED; + case 38: return EQUIP_ERR_PLAYER_DEAD; + case 39: return EQUIP_ERR_CLIENT_LOCKED_OUT; + case 40: return EQUIP_ERR_INTERNAL_BAG_ERROR; + case 41: return EQUIP_ERR_ONLY_ONE_BOLT; + case 42: return EQUIP_ERR_ONLY_ONE_AMMO; + case 43: return EQUIP_ERR_CANT_WRAP_STACKABLE; + case 44: return EQUIP_ERR_CANT_WRAP_EQUIPPED; + case 45: return EQUIP_ERR_CANT_WRAP_WRAPPED; + case 46: return EQUIP_ERR_CANT_WRAP_BOUND; + case 47: return EQUIP_ERR_CANT_WRAP_UNIQUE; + case 48: return EQUIP_ERR_CANT_WRAP_BAGS; + case 49: return EQUIP_ERR_LOOT_GONE; + case 50: return EQUIP_ERR_INV_FULL; case 51: return EQUIP_ERR_BANK_FULL; - case 52: return EQUIP_ERR_ITEM_IS_CURRENTLY_SOLD_OUT; - case 53: return EQUIP_ERR_BAG_FULL3; - case 54: return EQUIP_ERR_ITEM_NOT_FOUND2; - case 55: return EQUIP_ERR_ITEM_CANT_STACK2; - case 56: return EQUIP_ERR_BAG_FULL4; - case 57: return EQUIP_ERR_ITEM_SOLD_OUT; + case 52: return EQUIP_ERR_VENDOR_SOLD_OUT; + case 53: return EQUIP_ERR_BAG_FULL_2; + case 54: return EQUIP_ERR_ITEM_NOT_FOUND_2; + case 55: return EQUIP_ERR_CANT_STACK_2; + case 56: return EQUIP_ERR_BAG_FULL_3; + case 57: return EQUIP_ERR_VENDOR_SOLD_OUT_2; case 58: return EQUIP_ERR_OBJECT_IS_BUSY; - case 59: return EQUIP_ERR_NONE; + case 59: return EQUIP_ERR_CANT_BE_DISENCHANTED; case 60: return EQUIP_ERR_NOT_IN_COMBAT; case 61: return EQUIP_ERR_NOT_WHILE_DISARMED; - case 62: return EQUIP_ERR_BAG_FULL6; + case 62: return EQUIP_ERR_BAG_FULL_4; case 63: return EQUIP_ERR_CANT_EQUIP_RANK; case 64: return EQUIP_ERR_CANT_EQUIP_REPUTATION; case 65: return EQUIP_ERR_TOO_MANY_SPECIAL_BAGS; case 66: return EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW; - case 67: return EQUIP_ERR_ITEM_UNIQUE_EQUIPABLE; + case 67: return EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE; case 68: return EQUIP_ERR_VENDOR_MISSING_TURNINS; case 69: return EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS; case 70: return EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS; case 71: return EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED; case 72: return EQUIP_ERR_MAIL_BOUND_ITEM; - case 73: return EQUIP_ERR_NO_SPLIT_WHILE_PROSPECTING; - case 74: return EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED; - case 75: return EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED; - case 76: return EQUIP_ERR_TOO_MUCH_GOLD; - case 77: return EQUIP_ERR_NOT_DURING_ARENA_MATCH; - case 78: return EQUIP_ERR_CANNOT_TRADE_THAT; - case 79: return EQUIP_ERR_PERSONAL_ARENA_RATING_TOO_LOW; - case 80: return EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM; - case 81: return EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS; - case 82: return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED; - case 83: return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED; - case 84: return EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED; - case 85: return EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW; - case 86: return EQUIP_ERR_CANT_EQUIP_NEED_TALENT; - case 87: return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED; + case 73: return EQUIP_ERR_INTERNAL_BAG_ERROR_2; + case 74: return EQUIP_ERR_BAG_FULL_5; + case 75: return EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED; + case 76: return EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED; + case 77: return EQUIP_ERR_TOO_MUCH_GOLD; + case 78: return EQUIP_ERR_NOT_DURING_ARENA_MATCH; + case 79: return EQUIP_ERR_TRADE_BOUND_ITEM; + case 80: return EQUIP_ERR_CANT_EQUIP_RATING; + case 81: return EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM; + case 82: return EQUIP_ERR_NOT_SAME_ACCOUNT; + case 83: return EQUIP_ERR_NONE; + case 84: return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS; + case 85: return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED_IS; + case 86: return EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED; + case 87: return EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW; + case 88: return EQUIP_ERR_CANT_EQUIP_NEED_TALENT; + case 89: return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS; + case 90: return EQUIP_ERR_SHAPESHIFT_FORM_CANNOT_EQUIP; + case 91: return EQUIP_ERR_ITEM_INVENTORY_FULL_SATCHEL; default: throw std::out_of_range("index"); } } @@ -231,91 +239,95 @@ TC_API_EXPORT size_t EnumUtils<InventoryResult>::ToIndex(InventoryResult value) case EQUIP_ERR_OK: return 0; case EQUIP_ERR_CANT_EQUIP_LEVEL_I: return 1; case EQUIP_ERR_CANT_EQUIP_SKILL: return 2; - case EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT: return 3; + case EQUIP_ERR_WRONG_SLOT: return 3; case EQUIP_ERR_BAG_FULL: return 4; - case EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG: return 5; - case EQUIP_ERR_CANT_TRADE_EQUIP_BAGS: return 6; - case EQUIP_ERR_ONLY_AMMO_CAN_GO_HERE: return 7; - case EQUIP_ERR_NO_REQUIRED_PROFICIENCY: return 8; - case EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE: return 9; - case EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM: return 10; - case EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM2: return 11; - case EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE2: return 12; - case EQUIP_ERR_CANT_EQUIP_WITH_TWOHANDED: return 13; - case EQUIP_ERR_CANT_DUAL_WIELD: return 14; - case EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG: return 15; - case EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2: return 16; - case EQUIP_ERR_CANT_CARRY_MORE_OF_THIS: return 17; - case EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE3: return 18; - case EQUIP_ERR_ITEM_CANT_STACK: return 19; - case EQUIP_ERR_ITEM_CANT_BE_EQUIPPED: return 20; - case EQUIP_ERR_ITEMS_CANT_BE_SWAPPED: return 21; - case EQUIP_ERR_SLOT_IS_EMPTY: return 22; + case EQUIP_ERR_BAG_IN_BAG: return 5; + case EQUIP_ERR_TRADE_EQUIPPED_BAG: return 6; + case EQUIP_ERR_AMMO_ONLY: return 7; + case EQUIP_ERR_PROFICIENCY_NEEDED: return 8; + case EQUIP_ERR_NO_SLOT_AVAILABLE: return 9; + case EQUIP_ERR_CANT_EQUIP_EVER: return 10; + case EQUIP_ERR_CANT_EQUIP_EVER_2: return 11; + case EQUIP_ERR_NO_SLOT_AVAILABLE_2: return 12; + case EQUIP_ERR_2HANDED_EQUIPPED: return 13; + case EQUIP_ERR_2HSKILLNOTFOUND: return 14; + case EQUIP_ERR_WRONG_BAG_TYPE: return 15; + case EQUIP_ERR_WRONG_BAG_TYPE_2: return 16; + case EQUIP_ERR_ITEM_MAX_COUNT: return 17; + case EQUIP_ERR_NO_SLOT_AVAILABLE_3: return 18; + case EQUIP_ERR_CANT_STACK: return 19; + case EQUIP_ERR_NOT_EQUIPPABLE: return 20; + case EQUIP_ERR_CANT_SWAP: return 21; + case EQUIP_ERR_SLOT_EMPTY: return 22; case EQUIP_ERR_ITEM_NOT_FOUND: return 23; - case EQUIP_ERR_CANT_DROP_SOULBOUND: return 24; + case EQUIP_ERR_DROP_BOUND_ITEM: return 24; case EQUIP_ERR_OUT_OF_RANGE: return 25; - case EQUIP_ERR_TRIED_TO_SPLIT_MORE_THAN_COUNT: return 26; - case EQUIP_ERR_COULDNT_SPLIT_ITEMS: return 27; - case EQUIP_ERR_MISSING_REAGENT: return 28; + case EQUIP_ERR_TOO_FEW_TO_SPLIT: return 26; + case EQUIP_ERR_SPLIT_FAILED: return 27; + case EQUIP_ERR_SPELL_FAILED_REAGENTS_GENERIC: return 28; case EQUIP_ERR_NOT_ENOUGH_MONEY: return 29; case EQUIP_ERR_NOT_A_BAG: return 30; - case EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS: return 31; - case EQUIP_ERR_DONT_OWN_THAT_ITEM: return 32; - case EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER: return 33; - case EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT: return 34; - case EQUIP_ERR_TOO_FAR_AWAY_FROM_BANK: return 35; + case EQUIP_ERR_DESTROY_NONEMPTY_BAG: return 31; + case EQUIP_ERR_NOT_OWNER: return 32; + case EQUIP_ERR_ONLY_ONE_QUIVER: return 33; + case EQUIP_ERR_NO_BANK_SLOT: return 34; + case EQUIP_ERR_NO_BANK_HERE: return 35; case EQUIP_ERR_ITEM_LOCKED: return 36; - case EQUIP_ERR_YOU_ARE_STUNNED: return 37; - case EQUIP_ERR_YOU_ARE_DEAD: return 38; - case EQUIP_ERR_CANT_DO_RIGHT_NOW: return 39; - case EQUIP_ERR_INT_BAG_ERROR: return 40; - case EQUIP_ERR_CAN_EQUIP_ONLY1_BOLT: return 41; - case EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH: return 42; - case EQUIP_ERR_STACKABLE_CANT_BE_WRAPPED: return 43; - case EQUIP_ERR_EQUIPPED_CANT_BE_WRAPPED: return 44; - case EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED: return 45; - case EQUIP_ERR_BOUND_CANT_BE_WRAPPED: return 46; - case EQUIP_ERR_UNIQUE_CANT_BE_WRAPPED: return 47; - case EQUIP_ERR_BAGS_CANT_BE_WRAPPED: return 48; - case EQUIP_ERR_ALREADY_LOOTED: return 49; - case EQUIP_ERR_INVENTORY_FULL: return 50; + case EQUIP_ERR_GENERIC_STUNNED: return 37; + case EQUIP_ERR_PLAYER_DEAD: return 38; + case EQUIP_ERR_CLIENT_LOCKED_OUT: return 39; + case EQUIP_ERR_INTERNAL_BAG_ERROR: return 40; + case EQUIP_ERR_ONLY_ONE_BOLT: return 41; + case EQUIP_ERR_ONLY_ONE_AMMO: return 42; + case EQUIP_ERR_CANT_WRAP_STACKABLE: return 43; + case EQUIP_ERR_CANT_WRAP_EQUIPPED: return 44; + case EQUIP_ERR_CANT_WRAP_WRAPPED: return 45; + case EQUIP_ERR_CANT_WRAP_BOUND: return 46; + case EQUIP_ERR_CANT_WRAP_UNIQUE: return 47; + case EQUIP_ERR_CANT_WRAP_BAGS: return 48; + case EQUIP_ERR_LOOT_GONE: return 49; + case EQUIP_ERR_INV_FULL: return 50; case EQUIP_ERR_BANK_FULL: return 51; - case EQUIP_ERR_ITEM_IS_CURRENTLY_SOLD_OUT: return 52; - case EQUIP_ERR_BAG_FULL3: return 53; - case EQUIP_ERR_ITEM_NOT_FOUND2: return 54; - case EQUIP_ERR_ITEM_CANT_STACK2: return 55; - case EQUIP_ERR_BAG_FULL4: return 56; - case EQUIP_ERR_ITEM_SOLD_OUT: return 57; + case EQUIP_ERR_VENDOR_SOLD_OUT: return 52; + case EQUIP_ERR_BAG_FULL_2: return 53; + case EQUIP_ERR_ITEM_NOT_FOUND_2: return 54; + case EQUIP_ERR_CANT_STACK_2: return 55; + case EQUIP_ERR_BAG_FULL_3: return 56; + case EQUIP_ERR_VENDOR_SOLD_OUT_2: return 57; case EQUIP_ERR_OBJECT_IS_BUSY: return 58; - case EQUIP_ERR_NONE: return 59; + case EQUIP_ERR_CANT_BE_DISENCHANTED: return 59; case EQUIP_ERR_NOT_IN_COMBAT: return 60; case EQUIP_ERR_NOT_WHILE_DISARMED: return 61; - case EQUIP_ERR_BAG_FULL6: return 62; + case EQUIP_ERR_BAG_FULL_4: return 62; case EQUIP_ERR_CANT_EQUIP_RANK: return 63; case EQUIP_ERR_CANT_EQUIP_REPUTATION: return 64; case EQUIP_ERR_TOO_MANY_SPECIAL_BAGS: return 65; case EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW: return 66; - case EQUIP_ERR_ITEM_UNIQUE_EQUIPABLE: return 67; + case EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE: return 67; case EQUIP_ERR_VENDOR_MISSING_TURNINS: return 68; case EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS: return 69; case EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS: return 70; case EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED: return 71; case EQUIP_ERR_MAIL_BOUND_ITEM: return 72; - case EQUIP_ERR_NO_SPLIT_WHILE_PROSPECTING: return 73; - case EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED: return 74; - case EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED: return 75; - case EQUIP_ERR_TOO_MUCH_GOLD: return 76; - case EQUIP_ERR_NOT_DURING_ARENA_MATCH: return 77; - case EQUIP_ERR_CANNOT_TRADE_THAT: return 78; - case EQUIP_ERR_PERSONAL_ARENA_RATING_TOO_LOW: return 79; - case EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM: return 80; - case EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS: return 81; - case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED: return 82; - case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED: return 83; - case EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED: return 84; - case EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW: return 85; - case EQUIP_ERR_CANT_EQUIP_NEED_TALENT: return 86; - case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED: return 87; + case EQUIP_ERR_INTERNAL_BAG_ERROR_2: return 73; + case EQUIP_ERR_BAG_FULL_5: return 74; + case EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED: return 75; + case EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED: return 76; + case EQUIP_ERR_TOO_MUCH_GOLD: return 77; + case EQUIP_ERR_NOT_DURING_ARENA_MATCH: return 78; + case EQUIP_ERR_TRADE_BOUND_ITEM: return 79; + case EQUIP_ERR_CANT_EQUIP_RATING: return 80; + case EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM: return 81; + case EQUIP_ERR_NOT_SAME_ACCOUNT: return 82; + case EQUIP_ERR_NONE: return 83; + case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS: return 84; + case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED_IS: return 85; + case EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED: return 86; + case EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW: return 87; + case EQUIP_ERR_CANT_EQUIP_NEED_TALENT: return 88; + case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS: return 89; + case EQUIP_ERR_SHAPESHIFT_FORM_CANNOT_EQUIP: return 90; + case EQUIP_ERR_ITEM_INVENTORY_FULL_SATCHEL: return 91; default: throw std::out_of_range("value"); } } diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 050f01c6b9a..431be68fb2d 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -5264,8 +5264,8 @@ float Player::GetSpellCritFromIntellect() const if (level > GT_MAX_LEVEL) level = GT_MAX_LEVEL; - GtChanceToSpellCritBaseEntry const* critBase = sGtChanceToSpellCritBaseStore.LookupEntry(pclass-1); - GtChanceToSpellCritEntry const* critRatio = sGtChanceToSpellCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); + GtChanceToSpellCritBaseEntry const* critBase = sGtChanceToSpellCritBaseStore.LookupEntry(pclass - 1); + GtChanceToSpellCritEntry const* critRatio = sGtChanceToSpellCritStore.LookupEntry((pclass - 1) * GT_MAX_LEVEL + level - 1); if (critBase == nullptr || critRatio == nullptr) return 0.0f; @@ -10126,11 +10126,11 @@ InventoryResult Player::CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item { if (no_space_count) *no_space_count = count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } if (pItem && pItem->m_lootGenerated) - return EQUIP_ERR_ALREADY_LOOTED; + return EQUIP_ERR_LOOT_GONE; // no maximum if ((pProto->MaxCount <= 0 && pProto->ItemLimitCategory == 0) || pProto->MaxCount == 2147483647) @@ -10143,7 +10143,7 @@ InventoryResult Player::CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item { if (no_space_count) *no_space_count = count + curcount - pProto->MaxCount; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } } @@ -10155,7 +10155,7 @@ InventoryResult Player::CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item { if (no_space_count) *no_space_count = count; - return EQUIP_ERR_ITEM_CANT_BE_EQUIPPED; + return EQUIP_ERR_NOT_EQUIPPABLE; } if (limitEntry->Flags == ITEM_LIMIT_CATEGORY_MODE_HAVE) @@ -10167,7 +10167,7 @@ InventoryResult Player::CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item *no_space_count = count + curcount - limitEntry->Quantity; if (itemLimitCategory) *itemLimitCategory = pProto->ItemLimitCategory; - return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED; + return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS; } } } @@ -10234,7 +10234,7 @@ InventoryResult Player::CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemP uint32 need_space; if (pSrcItem && pSrcItem->IsNotEmptyBag() && !IsBagPos(uint16(bag) << 8 | slot)) - return EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS; + return EQUIP_ERR_DESTROY_NONEMPTY_BAG; // empty specific slot - check item fit to slot if (!pItem2 || swap) @@ -10243,31 +10243,31 @@ InventoryResult Player::CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemP { // keyring case if (slot >= KEYRING_SLOT_START && slot < KEYRING_SLOT_START+GetMaxKeyringSize() && !(pProto->BagFamily & BAG_FAMILY_MASK_KEYS)) - return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; + return EQUIP_ERR_WRONG_BAG_TYPE; // currencytoken case if (slot >= CURRENCYTOKEN_SLOT_START && slot < CURRENCYTOKEN_SLOT_END && !(pProto->IsCurrencyToken())) - return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; + return EQUIP_ERR_WRONG_BAG_TYPE; // prevent cheating if ((slot >= BUYBACK_SLOT_START && slot < BUYBACK_SLOT_END) || slot >= PLAYER_SLOT_END) - return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; + return EQUIP_ERR_WRONG_BAG_TYPE; } else { Bag* pBag = GetBagByPos(bag); if (!pBag) - return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; + return EQUIP_ERR_WRONG_BAG_TYPE; ItemTemplate const* pBagProto = pBag->GetTemplate(); if (!pBagProto) - return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; + return EQUIP_ERR_WRONG_BAG_TYPE; if (slot >= pBagProto->ContainerSlots) - return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; + return EQUIP_ERR_WRONG_BAG_TYPE; if (!ItemCanGoIntoBag(pProto, pBagProto)) - return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; + return EQUIP_ERR_WRONG_BAG_TYPE; } // non empty stack with space @@ -10301,26 +10301,26 @@ InventoryResult Player::CanStoreItem_InBag(uint8 bag, ItemPosCountVec &dest, Ite { // skip specific bag already processed in first called CanStoreItem_InBag if (bag == skip_bag) - return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; + return EQUIP_ERR_WRONG_BAG_TYPE; // skip non-existing bag or self targeted bag Bag* pBag = GetBagByPos(bag); if (!pBag || pBag == pSrcItem) - return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; + return EQUIP_ERR_WRONG_BAG_TYPE; if (pSrcItem && pSrcItem->IsNotEmptyBag()) - return EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS; + return EQUIP_ERR_DESTROY_NONEMPTY_BAG; ItemTemplate const* pBagProto = pBag->GetTemplate(); if (!pBagProto) - return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; + return EQUIP_ERR_WRONG_BAG_TYPE; // specialized bag mode or non-specialized if (non_specialized != (pBagProto->Class == ITEM_CLASS_CONTAINER && pBagProto->SubClass == ITEM_SUBCLASS_CONTAINER)) - return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; + return EQUIP_ERR_WRONG_BAG_TYPE; if (!ItemCanGoIntoBag(pProto, pBagProto)) - return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; + return EQUIP_ERR_WRONG_BAG_TYPE; for (uint32 j = 0; j < pBag->GetBagSize(); j++) { @@ -10370,7 +10370,7 @@ InventoryResult Player::CanStoreItem_InInventorySlots(uint8 slot_begin, uint8 sl { //this is never called for non-bag slots so we can do this if (pSrcItem && pSrcItem->IsNotEmptyBag()) - return EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS; + return EQUIP_ERR_DESTROY_NONEMPTY_BAG; for (uint32 j = slot_begin; j < slot_end; j++) { @@ -10425,7 +10425,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des { if (no_space_count) *no_space_count = count; - return swap ? EQUIP_ERR_ITEMS_CANT_BE_SWAPPED : EQUIP_ERR_ITEM_NOT_FOUND; + return swap ? EQUIP_ERR_CANT_SWAP : EQUIP_ERR_ITEM_NOT_FOUND; } if (pItem) @@ -10435,14 +10435,14 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des { if (no_space_count) *no_space_count = count; - return EQUIP_ERR_ALREADY_LOOTED; + return EQUIP_ERR_LOOT_GONE; } if (pItem->IsBindedNotWith(this)) { if (no_space_count) *no_space_count = count; - return EQUIP_ERR_DONT_OWN_THAT_ITEM; + return EQUIP_ERR_NOT_OWNER; } } @@ -10478,7 +10478,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } } @@ -10507,7 +10507,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } res = CanStoreItem_InInventorySlots(INVENTORY_SLOT_ITEM_START, INVENTORY_SLOT_ITEM_END, dest, pProto, count, true, pItem, bag, slot); @@ -10525,7 +10525,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } } else // equipped bag @@ -10549,7 +10549,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } } } @@ -10576,7 +10576,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } res = CanStoreItem_InInventorySlots(CURRENCYTOKEN_SLOT_START, CURRENCYTOKEN_SLOT_END, dest, pProto, count, false, pItem, bag, slot); @@ -10594,7 +10594,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } } else if (pProto->IsCurrencyToken()) @@ -10614,7 +10614,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } } @@ -10633,7 +10633,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } } else // equipped bag @@ -10656,7 +10656,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } } } @@ -10681,7 +10681,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } res = CanStoreItem_InInventorySlots(INVENTORY_SLOT_ITEM_START, INVENTORY_SLOT_ITEM_END, dest, pProto, count, true, pItem, bag, slot); @@ -10699,7 +10699,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } if (pProto->BagFamily) @@ -10717,7 +10717,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } } } @@ -10735,7 +10735,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } } } @@ -10761,7 +10761,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } } else if (pProto->IsCurrencyToken()) @@ -10781,7 +10781,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } } @@ -10798,13 +10798,13 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } } } if (pItem && pItem->IsNotEmptyBag()) - return EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG; + return EQUIP_ERR_BAG_IN_BAG; // search free slot res = CanStoreItem_InInventorySlots(INVENTORY_SLOT_ITEM_START, INVENTORY_SLOT_ITEM_END, dest, pProto, count, false, pItem, bag, slot); @@ -10822,7 +10822,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++) @@ -10838,14 +10838,14 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS; + return EQUIP_ERR_ITEM_MAX_COUNT; } } if (no_space_count) *no_space_count = count + no_similar_count; - return EQUIP_ERR_INVENTORY_FULL; + return EQUIP_ERR_INV_FULL; } ////////////////////////////////////////////////////////////////////////// @@ -10936,11 +10936,11 @@ InventoryResult Player::CanStoreItems(Item** items, int count, uint32* itemLimit // item used if (item->m_lootGenerated) - return EQUIP_ERR_ALREADY_LOOTED; + return EQUIP_ERR_LOOT_GONE; // item it 'bind' if (item->IsBindedNotWith(this)) - return EQUIP_ERR_DONT_OWN_THAT_ITEM; + return EQUIP_ERR_NOT_OWNER; ItemTemplate const* pBagProto; @@ -11186,10 +11186,10 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool { // item used if (pItem->m_lootGenerated) - return EQUIP_ERR_ALREADY_LOOTED; + return EQUIP_ERR_LOOT_GONE; if (pItem->IsBindedNotWith(this)) - return EQUIP_ERR_DONT_OWN_THAT_ITEM; + return EQUIP_ERR_NOT_OWNER; // check count of items (skip for auto move for same player from bank) InventoryResult res = CanTakeMoreSimilarItems(pItem); @@ -11202,10 +11202,10 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool // May be here should be more stronger checks; STUNNED checked // ROOT, CONFUSED, DISTRACTED, FLEEING this needs to be checked. if (HasUnitState(UNIT_STATE_STUNNED)) - return EQUIP_ERR_YOU_ARE_STUNNED; + return EQUIP_ERR_GENERIC_STUNNED; if (IsCharmed()) - return EQUIP_ERR_CANT_DO_RIGHT_NOW; // @todo is this the correct error? + return EQUIP_ERR_CLIENT_LOCKED_OUT; // @todo is this the correct error? // do not allow equipping gear except weapons, offhands, projectiles, relics in // - combat @@ -11221,27 +11221,27 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool } if (IsInCombat()&& (pProto->Class == ITEM_CLASS_WEAPON || pProto->InventoryType == INVTYPE_RELIC) && m_weaponChangeTimer != 0) - return EQUIP_ERR_CANT_DO_RIGHT_NOW; // maybe exist better err + return EQUIP_ERR_CLIENT_LOCKED_OUT; // maybe exist better err if (IsNonMeleeSpellCast(false)) - return EQUIP_ERR_CANT_DO_RIGHT_NOW; + return EQUIP_ERR_CLIENT_LOCKED_OUT; } ScalingStatDistributionEntry const* ssd = pProto->ScalingStatDistribution ? sScalingStatDistributionStore.LookupEntry(pProto->ScalingStatDistribution) : 0; // check allowed level (extend range to upper values if MaxLevel more or equal max player level, this let GM set high level with 1...max range items) if (ssd && ssd->Maxlevel < DEFAULT_MAX_LEVEL && ssd->Maxlevel < GetLevel()) - return EQUIP_ERR_ITEM_CANT_BE_EQUIPPED; + return EQUIP_ERR_NOT_EQUIPPABLE; uint8 eslot = FindEquipSlot(pProto, slot, swap); if (eslot == NULL_SLOT) - return EQUIP_ERR_ITEM_CANT_BE_EQUIPPED; + return EQUIP_ERR_NOT_EQUIPPABLE; res = CanUseItem(pItem, not_loading); if (res != EQUIP_ERR_OK) return res; if (!swap && GetItemByPos(INVENTORY_SLOT_BAG_0, eslot)) - return EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE; + return EQUIP_ERR_NO_SLOT_AVAILABLE; // if we are swapping 2 equiped items, CanEquipUniqueItem check // should ignore the item we are trying to swap, and not the @@ -11285,8 +11285,8 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool if (ItemTemplate const* pBagProto = pBag->GetTemplate()) if (pBagProto->Class == pProto->Class && (!swap || pBag->GetSlot() != eslot)) return (pBagProto->SubClass == ITEM_SUBCLASS_AMMO_POUCH) - ? EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH - : EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER; + ? EQUIP_ERR_ONLY_ONE_AMMO + : EQUIP_ERR_ONLY_ONE_QUIVER; uint32 type = pProto->InventoryType; @@ -11294,21 +11294,21 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool { // Do not allow polearm to be equipped in the offhand (rare case for the only 1h polearm 41750) if (type == INVTYPE_WEAPON && pProto->SubClass == ITEM_SUBCLASS_WEAPON_POLEARM) - return EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT; + return EQUIP_ERR_WRONG_SLOT; else if (type == INVTYPE_WEAPON || type == INVTYPE_WEAPONOFFHAND) { if (!CanDualWield()) - return EQUIP_ERR_CANT_DUAL_WIELD; + return EQUIP_ERR_2HSKILLNOTFOUND; } else if (type == INVTYPE_2HWEAPON) { if (!CanDualWield() || !CanTitanGrip()) - return EQUIP_ERR_CANT_DUAL_WIELD; + return EQUIP_ERR_2HSKILLNOTFOUND; } if (IsTwoHandUsed()) - return EQUIP_ERR_CANT_EQUIP_WITH_TWOHANDED; + return EQUIP_ERR_2HANDED_EQUIPPED; } // equip two-hand weapon case (with possible unequip 2 items) @@ -11317,10 +11317,10 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool if (eslot == EQUIPMENT_SLOT_OFFHAND) { if (!CanTitanGrip()) - return EQUIP_ERR_ITEM_CANT_BE_EQUIPPED; + return EQUIP_ERR_NOT_EQUIPPABLE; } else if (eslot != EQUIPMENT_SLOT_MAINHAND) - return EQUIP_ERR_ITEM_CANT_BE_EQUIPPED; + return EQUIP_ERR_NOT_EQUIPPABLE; if (!CanTitanGrip()) { @@ -11330,7 +11330,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool if (offItem && (!not_loading || CanUnequipItem(uint16(INVENTORY_SLOT_BAG_0) << 8 | EQUIPMENT_SLOT_OFFHAND, false) != EQUIP_ERR_OK || CanStoreItem(NULL_BAG, NULL_SLOT, off_dest, offItem, false) != EQUIP_ERR_OK)) - return swap ? EQUIP_ERR_ITEMS_CANT_BE_SWAPPED : EQUIP_ERR_INVENTORY_FULL; + return swap ? EQUIP_ERR_CANT_SWAP : EQUIP_ERR_INV_FULL; } } dest = ((INVENTORY_SLOT_BAG_0 << 8) | eslot); @@ -11338,7 +11338,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool } } - return !swap ? EQUIP_ERR_ITEM_NOT_FOUND : EQUIP_ERR_ITEMS_CANT_BE_SWAPPED; + return !swap ? EQUIP_ERR_ITEM_NOT_FOUND : EQUIP_ERR_CANT_SWAP; } InventoryResult Player::CanUnequipItem(uint16 pos, bool swap) const @@ -11362,10 +11362,10 @@ InventoryResult Player::CanUnequipItem(uint16 pos, bool swap) const // item used if (pItem->m_lootGenerated) - return EQUIP_ERR_ALREADY_LOOTED; + return EQUIP_ERR_LOOT_GONE; if (IsCharmed()) - return EQUIP_ERR_CANT_DO_RIGHT_NOW; // @todo is this the correct error? + return EQUIP_ERR_CLIENT_LOCKED_OUT; // @todo is this the correct error? // do not allow unequipping gear except weapons, offhands, projectiles, relics in // - combat @@ -11381,7 +11381,7 @@ InventoryResult Player::CanUnequipItem(uint16 pos, bool swap) const } if (!swap && pItem->IsNotEmptyBag()) - return EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS; + return EQUIP_ERR_DESTROY_NONEMPTY_BAG; return EQUIP_ERR_OK; } @@ -11389,7 +11389,7 @@ InventoryResult Player::CanUnequipItem(uint16 pos, bool swap) const InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, Item* pItem, bool swap, bool not_loading) const { if (!pItem) - return swap ? EQUIP_ERR_ITEMS_CANT_BE_SWAPPED : EQUIP_ERR_ITEM_NOT_FOUND; + return swap ? EQUIP_ERR_CANT_SWAP : EQUIP_ERR_ITEM_NOT_FOUND; uint32 count = pItem->GetCount(); @@ -11397,14 +11397,14 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest GetName(), GetGUID().ToString(), bag, slot, pItem->GetEntry(), pItem->GetCount()); ItemTemplate const* pProto = pItem->GetTemplate(); if (!pProto) - return swap ? EQUIP_ERR_ITEMS_CANT_BE_SWAPPED : EQUIP_ERR_ITEM_NOT_FOUND; + return swap ? EQUIP_ERR_CANT_SWAP : EQUIP_ERR_ITEM_NOT_FOUND; // item used if (pItem->m_lootGenerated) - return EQUIP_ERR_ALREADY_LOOTED; + return EQUIP_ERR_LOOT_GONE; if (pItem->IsBindedNotWith(this)) - return EQUIP_ERR_DONT_OWN_THAT_ITEM; + return EQUIP_ERR_NOT_OWNER; // Currency tokens are not supposed to be swapped out of their hidden bag uint8 pItemslot = pItem->GetSlot(); @@ -11412,7 +11412,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest { TC_LOG_ERROR("entities.player.cheat", "Possible hacking attempt: Player {} ({}) tried to move token [{} entry: {}] out of the currency bag!", GetName(), GetGUID().ToString(), pItem->GetGUID().ToString(), pProto->ItemId); - return EQUIP_ERR_ITEMS_CANT_BE_SWAPPED; + return EQUIP_ERR_CANT_SWAP; } // check count of items (skip for auto move for same player from bank) @@ -11426,10 +11426,10 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest if (slot >= BANK_SLOT_BAG_START && slot < BANK_SLOT_BAG_END) { if (!pItem->IsBag()) - return EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT; + return EQUIP_ERR_WRONG_SLOT; if (slot - BANK_SLOT_BAG_START >= GetBankBagSlotCount()) - return EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT; + return EQUIP_ERR_NO_BANK_SLOT; res = CanUseItem(pItem, not_loading); if (res != EQUIP_ERR_OK) @@ -11450,7 +11450,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest if (bag != NULL_BAG) { if (pItem->IsNotEmptyBag()) - return EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG; + return EQUIP_ERR_BAG_IN_BAG; // search stack in bag for merge to if (pProto->Stackable != 1) @@ -11582,7 +11582,7 @@ InventoryResult Player::CanUseItem(Item* pItem, bool not_loading) const GetName(), GetGUID().ToString(), pItem->GetEntry()); if (!IsAlive() && not_loading) - return EQUIP_ERR_YOU_ARE_DEAD; + return EQUIP_ERR_PLAYER_DEAD; //if (isStunned()) // return EQUIP_ERR_YOU_ARE_STUNNED; @@ -11591,7 +11591,7 @@ InventoryResult Player::CanUseItem(Item* pItem, bool not_loading) const if (pProto) { if (pItem->IsBindedNotWith(this)) - return EQUIP_ERR_DONT_OWN_THAT_ITEM; + return EQUIP_ERR_NOT_OWNER; InventoryResult res = CanUseItem(pProto); if (res != EQUIP_ERR_OK) @@ -11604,7 +11604,7 @@ InventoryResult Player::CanUseItem(Item* pItem, bool not_loading) const // Armor that is binded to account can "morph" from plate to mail, etc. if skill is not learned yet. if (pProto->Quality == ITEM_QUALITY_HEIRLOOM && pProto->Class == ITEM_CLASS_ARMOR && !HasSkill(itemSkill)) { - /// @todo when you right-click already equipped item it throws EQUIP_ERR_NO_REQUIRED_PROFICIENCY. + /// @todo when you right-click already equipped item it throws EQUIP_ERR_PROFICIENCY_NEEDED. // In fact it's a visual bug, everything works properly... I need sniffs of operations with // binded to account items from off server. @@ -11622,7 +11622,7 @@ InventoryResult Player::CanUseItem(Item* pItem, bool not_loading) const } } if (!allowEquip && GetSkillValue(itemSkill) == 0) - return EQUIP_ERR_NO_REQUIRED_PROFICIENCY; + return EQUIP_ERR_PROFICIENCY_NEEDED; } if (pProto->RequiredReputationFaction && uint32(GetReputationRank(pProto->RequiredReputationFaction)) < pProto->RequiredReputationRank) @@ -11643,28 +11643,28 @@ InventoryResult Player::CanUseItem(ItemTemplate const* proto) const if (((proto->Flags2 & ITEM_FLAG2_FACTION_HORDE) && GetTeam() != HORDE) || (((proto->Flags2 & ITEM_FLAG2_FACTION_ALLIANCE) && GetTeam() != ALLIANCE))) - return EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM; + return EQUIP_ERR_CANT_EQUIP_EVER; if ((proto->AllowableClass & GetClassMask()) == 0 || (proto->AllowableRace & GetRaceMask()) == 0) - return EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM; + return EQUIP_ERR_CANT_EQUIP_EVER; if (proto->RequiredSkill != 0) { if (GetSkillValue(proto->RequiredSkill) == 0) - return EQUIP_ERR_NO_REQUIRED_PROFICIENCY; + return EQUIP_ERR_PROFICIENCY_NEEDED; else if (GetSkillValue(proto->RequiredSkill) < proto->RequiredSkillRank) return EQUIP_ERR_CANT_EQUIP_SKILL; } if (proto->RequiredSpell != 0 && !HasSpell(proto->RequiredSpell)) - return EQUIP_ERR_NO_REQUIRED_PROFICIENCY; + return EQUIP_ERR_PROFICIENCY_NEEDED; if (GetLevel() < proto->RequiredLevel) return EQUIP_ERR_CANT_EQUIP_LEVEL_I; // If World Event is not active, prevent using event dependant items if (proto->HolidayId && !IsHolidayActive((HolidayIds)proto->HolidayId)) - return EQUIP_ERR_CANT_DO_RIGHT_NOW; + return EQUIP_ERR_CLIENT_LOCKED_OUT; // learning (recipes, mounts, pets, etc.) if (proto->Spells[0].SpellId == 483 || proto->Spells[0].SpellId == 55884) @@ -11698,15 +11698,15 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje }; //Copy from function Item::GetSkill() if ((proto->AllowableClass & GetClassMask()) == 0 || (proto->AllowableRace & GetRaceMask()) == 0) - return EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM; + return EQUIP_ERR_CANT_EQUIP_EVER; if (proto->RequiredSpell != 0 && !HasSpell(proto->RequiredSpell)) - return EQUIP_ERR_NO_REQUIRED_PROFICIENCY; + return EQUIP_ERR_PROFICIENCY_NEEDED; if (proto->RequiredSkill != 0) { if (!GetSkillValue(proto->RequiredSkill)) - return EQUIP_ERR_NO_REQUIRED_PROFICIENCY; + return EQUIP_ERR_PROFICIENCY_NEEDED; else if (GetSkillValue(proto->RequiredSkill) < proto->RequiredSkillRank) return EQUIP_ERR_CANT_EQUIP_SKILL; } @@ -11714,7 +11714,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje uint8 _class = GetClass(); if (proto->Class == ITEM_CLASS_WEAPON && GetSkillValue(item_weapon_skills[proto->SubClass]) == 0) - return EQUIP_ERR_NO_REQUIRED_PROFICIENCY; + return EQUIP_ERR_PROFICIENCY_NEEDED; if (proto->Class == ITEM_CLASS_ARMOR && proto->SubClass > ITEM_SUBCLASS_ARMOR_MISCELLANEOUS && proto->SubClass < ITEM_SUBCLASS_ARMOR_BUCKLER && proto->InventoryType != INVTYPE_CLOAK) { @@ -11723,29 +11723,29 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje if (GetLevel() < 40) { if (proto->SubClass != ITEM_SUBCLASS_ARMOR_MAIL) - return EQUIP_ERR_CANT_DO_RIGHT_NOW; + return EQUIP_ERR_CLIENT_LOCKED_OUT; } else if (proto->SubClass != ITEM_SUBCLASS_ARMOR_PLATE) - return EQUIP_ERR_CANT_DO_RIGHT_NOW; + return EQUIP_ERR_CLIENT_LOCKED_OUT; } else if (_class == CLASS_HUNTER || _class == CLASS_SHAMAN) { if (GetLevel() < 40) { if (proto->SubClass != ITEM_SUBCLASS_ARMOR_LEATHER) - return EQUIP_ERR_CANT_DO_RIGHT_NOW; + return EQUIP_ERR_CLIENT_LOCKED_OUT; } else if (proto->SubClass != ITEM_SUBCLASS_ARMOR_MAIL) - return EQUIP_ERR_CANT_DO_RIGHT_NOW; + return EQUIP_ERR_CLIENT_LOCKED_OUT; } if (_class == CLASS_ROGUE || _class == CLASS_DRUID) if (proto->SubClass != ITEM_SUBCLASS_ARMOR_LEATHER) - return EQUIP_ERR_CANT_DO_RIGHT_NOW; + return EQUIP_ERR_CLIENT_LOCKED_OUT; if (_class == CLASS_MAGE || _class == CLASS_PRIEST || _class == CLASS_WARLOCK) if (proto->SubClass != ITEM_SUBCLASS_ARMOR_CLOTH) - return EQUIP_ERR_CANT_DO_RIGHT_NOW; + return EQUIP_ERR_CLIENT_LOCKED_OUT; } return EQUIP_ERR_OK; @@ -11755,14 +11755,14 @@ InventoryResult Player::CanUseAmmo(uint32 item) const { TC_LOG_DEBUG("entities.player.items", "STORAGE: CanUseAmmo item = {}", item); if (!IsAlive()) - return EQUIP_ERR_YOU_ARE_DEAD; + return EQUIP_ERR_PLAYER_DEAD; //if (isStunned()) // return EQUIP_ERR_YOU_ARE_STUNNED; ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item); if (pProto) { if (pProto->InventoryType!= INVTYPE_AMMO) - return EQUIP_ERR_ONLY_AMMO_CAN_GO_HERE; + return EQUIP_ERR_AMMO_ONLY; InventoryResult res = CanUseItem(pProto); if (res != EQUIP_ERR_OK) @@ -11774,7 +11774,7 @@ InventoryResult Player::CanUseAmmo(uint32 item) const // Requires No Ammo if (HasAura(46699)) - return EQUIP_ERR_BAG_FULL6; + return EQUIP_ERR_BAG_FULL_4; return EQUIP_ERR_OK; } @@ -12725,21 +12725,21 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count) if (pSrcItem->m_lootGenerated) // prevent split looting item (item { //best error message found for attempting to split while looting - SendEquipError(EQUIP_ERR_COULDNT_SPLIT_ITEMS, pSrcItem, nullptr); + SendEquipError(EQUIP_ERR_SPLIT_FAILED, pSrcItem, nullptr); return; } // not let split all items (can be only at cheating) if (pSrcItem->GetCount() == count) { - SendEquipError(EQUIP_ERR_COULDNT_SPLIT_ITEMS, pSrcItem, nullptr); + SendEquipError(EQUIP_ERR_SPLIT_FAILED, pSrcItem, nullptr); return; } // not let split more existing items (can be only at cheating) if (pSrcItem->GetCount() < count) { - SendEquipError(EQUIP_ERR_TRIED_TO_SPLIT_MORE_THAN_COUNT, pSrcItem, nullptr); + SendEquipError(EQUIP_ERR_TOO_FEW_TO_SPLIT, pSrcItem, nullptr); return; } @@ -12842,7 +12842,7 @@ void Player::SwapItem(uint16 src, uint16 dst) if (!IsAlive()) { - SendEquipError(EQUIP_ERR_YOU_ARE_DEAD, pSrcItem, pDstItem); + SendEquipError(EQUIP_ERR_PLAYER_DEAD, pSrcItem, pDstItem); return; } @@ -12863,14 +12863,14 @@ void Player::SwapItem(uint16 src, uint16 dst) // prevent put equipped/bank bag in self if (IsBagPos(src) && srcslot == dstbag) { - SendEquipError(EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG, pSrcItem, pDstItem); + SendEquipError(EQUIP_ERR_BAG_IN_BAG, pSrcItem, pDstItem); return; } // prevent equipping bag in the same slot from its inside if (IsBagPos(dst) && srcbag == dstslot) { - SendEquipError(EQUIP_ERR_ITEMS_CANT_BE_SWAPPED, pSrcItem, pDstItem); + SendEquipError(EQUIP_ERR_CANT_SWAP, pSrcItem, pDstItem); return; } @@ -13071,7 +13071,7 @@ void Player::SwapItem(uint16 src, uint16 dst) if (!bagItemProto || !ItemCanGoIntoBag(bagItemProto, emptyProto)) { // one from items not go to empty target bag - SendEquipError(EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG, pSrcItem, pDstItem); + SendEquipError(EQUIP_ERR_BAG_IN_BAG, pSrcItem, pDstItem); return; } @@ -13081,7 +13081,7 @@ void Player::SwapItem(uint16 src, uint16 dst) if (count > emptyBag->GetBagSize()) { // too small targeted bag - SendEquipError(EQUIP_ERR_ITEMS_CANT_BE_SWAPPED, pSrcItem, pDstItem); + SendEquipError(EQUIP_ERR_CANT_SWAP, pSrcItem, pDstItem); return; } @@ -13295,9 +13295,9 @@ void Player::SendEquipError(InventoryResult msg, Item* pItem, Item* pItem2, uint data << uint64(0); // container break; } - case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED: - case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED: - case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED: + case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS: + case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED_IS: + case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS: { ItemTemplate const* proto = pItem ? pItem->GetTemplate() : sObjectMgr->GetItemTemplate(itemid); data << uint32(proto ? proto->ItemLimitCategory : 0); @@ -14633,7 +14633,7 @@ bool Player::CanAddQuest(Quest const* quest, bool msg) const InventoryResult msg2 = CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, srcitem, count); // player already have max number (in most case 1) source item, no additional item needed and quest can be added. - if (msg2 == EQUIP_ERR_CANT_CARRY_MORE_OF_THIS) + if (msg2 == EQUIP_ERR_ITEM_MAX_COUNT) return true; if (msg2 != EQUIP_ERR_OK) { @@ -15735,7 +15735,7 @@ bool Player::GiveQuestSourceItem(Quest const* quest) return true; } // player already have max amount required item, just report success - else if (msg == EQUIP_ERR_CANT_CARRY_MORE_OF_THIS) + else if (msg == EQUIP_ERR_ITEM_MAX_COUNT) return true; SendEquipError(msg, nullptr, nullptr, srcitem); @@ -18063,7 +18063,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff) { std::map<ObjectGuid::LowType, Item*>::iterator invalidBagItr = invalidBagMap.find(bagGuid); if (std::find(problematicItems.begin(), problematicItems.end(), invalidBagItr->second) != problematicItems.end()) - err = EQUIP_ERR_INT_BAG_ERROR; + err = EQUIP_ERR_INTERNAL_BAG_ERROR; } else { @@ -21733,7 +21733,7 @@ bool Player::BuyItemFromVendorSlot(ObjectGuid vendorguid, uint32 vendorslot, uin { if (pProto->BuyCount * count != 1) { - SendEquipError(EQUIP_ERR_ITEM_CANT_BE_EQUIPPED, nullptr, nullptr); + SendEquipError(EQUIP_ERR_NOT_EQUIPPABLE, nullptr, nullptr); return false; } if (!_StoreOrEquipNewItem(vendorslot, item, count, bag, slot, price, pProto, creature, crItem, false)) @@ -21741,7 +21741,7 @@ bool Player::BuyItemFromVendorSlot(ObjectGuid vendorguid, uint32 vendorslot, uin } else { - SendEquipError(EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, nullptr, nullptr); + SendEquipError(EQUIP_ERR_WRONG_SLOT, nullptr, nullptr); return false; } @@ -24494,17 +24494,14 @@ void Player::SetTitle(CharTitlesEntry const* title, bool lost) SendDirectMessage(&data); } -uint32 Player::GetRuneBaseCooldown(uint8 index) +uint32 Player::GetRuneTypeBaseCooldown(RuneType runeType) const { - uint8 rune = GetBaseRune(index); - uint32 cooldown = RUNE_BASE_COOLDOWN; + float cooldown = RUNE_BASE_COOLDOWN; AuraEffectList const& regenAura = GetAuraEffectsByType(SPELL_AURA_MOD_POWER_REGEN_PERCENT); for (AuraEffectList::const_iterator i = regenAura.begin();i != regenAura.end(); ++i) - { - if ((*i)->GetMiscValue() == POWER_RUNE && (*i)->GetMiscValueB() == rune) - cooldown = cooldown * (100 - (*i)->GetAmount()) / 100; - } + if ((*i)->GetMiscValue() == POWER_RUNE && (*i)->GetMiscValueB() == runeType) + cooldown *= 1.0f - (*i)->GetAmount() / 100.0f; return cooldown; } @@ -24721,7 +24718,7 @@ void Player::StoreLootItem(uint8 lootSlot, Loot* loot) if (!item || item->is_looted) { - SendEquipError(EQUIP_ERR_ALREADY_LOOTED, nullptr, nullptr); + SendEquipError(EQUIP_ERR_LOOT_GONE, nullptr, nullptr); return; } @@ -24989,7 +24986,7 @@ InventoryResult Player::CanEquipUniqueItem(ItemTemplate const* itemProto, uint8 { // there is an equip limit on this item if (HasItemOrGemWithIdEquipped(itemProto->ItemId, 1, except_slot)) - return EQUIP_ERR_ITEM_UNIQUE_EQUIPABLE; + return EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE; } // check unique-equipped limit @@ -24997,16 +24994,16 @@ InventoryResult Player::CanEquipUniqueItem(ItemTemplate const* itemProto, uint8 { ItemLimitCategoryEntry const* limitEntry = sItemLimitCategoryStore.LookupEntry(itemProto->ItemLimitCategory); if (!limitEntry) - return EQUIP_ERR_ITEM_CANT_BE_EQUIPPED; + return EQUIP_ERR_NOT_EQUIPPABLE; // NOTE: limitEntry->mode not checked because if item have have-limit then it applied and to equip case if (limit_count > limitEntry->Quantity) - return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED; + return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS; // there is an equip limit on this item if (HasItemWithLimitCategoryEquipped(itemProto->ItemLimitCategory, limitEntry->Quantity - limit_count + 1, except_slot)) - return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED; + return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS; else if (HasGemWithLimitCategoryEquipped(itemProto->ItemLimitCategory, limitEntry->Quantity - limit_count + 1, except_slot)) return EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED; } diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 511338c91f6..ec5adfdcf04 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2180,7 +2180,8 @@ class TC_GAME_API Player : public Unit, public GridObject<Player> RuneType GetBaseRune(uint8 index) const { return RuneType(m_runes->runes[index].BaseRune); } RuneType GetCurrentRune(uint8 index) const { return RuneType(m_runes->runes[index].CurrentRune); } uint32 GetRuneCooldown(uint8 index) const { return m_runes->runes[index].Cooldown; } - uint32 GetRuneBaseCooldown(uint8 index); + uint32 GetRuneBaseCooldown(uint8 index) const { return GetRuneTypeBaseCooldown(GetBaseRune(index)); } + uint32 GetRuneTypeBaseCooldown(RuneType runeType) const; bool IsBaseRuneSlotsOnCooldown(RuneType runeType) const; RuneType GetLastUsedRune() const { return m_runes->lastUsedRune; } void SetLastUsedRune(RuneType type) { m_runes->lastUsedRune = type; } diff --git a/src/server/game/Entities/Player/PlayerTaxi.h b/src/server/game/Entities/Player/PlayerTaxi.h index 8fe480b9d07..880ffd03291 100644 --- a/src/server/game/Entities/Player/PlayerTaxi.h +++ b/src/server/game/Entities/Player/PlayerTaxi.h @@ -38,15 +38,15 @@ class TC_GAME_API PlayerTaxi bool IsTaximaskNodeKnown(uint32 nodeidx) const { - uint8 field = uint8((nodeidx - 1) / 32); - uint32 submask = 1 << ((nodeidx-1) % 32); - return (m_taximask[field] & submask) == submask; + uint32 field = uint32((nodeidx - 1) / (sizeof(TaxiMask::value_type) * 8)); + TaxiMask::value_type submask = TaxiMask::value_type(1 << ((nodeidx - 1) % (sizeof(TaxiMask::value_type) * 8))); + return (m_taximask[field] & submask) != 0; } bool SetTaximaskNode(uint32 nodeidx) { - uint8 field = uint8((nodeidx - 1) / 32); - uint32 submask = 1 << ((nodeidx - 1) % 32); - if ((m_taximask[field] & submask) != submask) + uint32 field = uint32((nodeidx - 1) / (sizeof(TaxiMask::value_type) * 8)); + TaxiMask::value_type submask = TaxiMask::value_type(1 << ((nodeidx - 1) % (sizeof(TaxiMask::value_type) * 8))); + if ((m_taximask[field] & submask) == 0) { m_taximask[field] |= submask; return true; diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index cb467b8de38..eb2a81d6283 100644 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -292,7 +292,7 @@ float Player::GetHealthBonusFromStamina() float baseStam = std::min(20.0f, stamina); float moreStam = stamina - baseStam; - return baseStam + (moreStam*10.0f); + return baseStam + (moreStam * 10.0f); } float Player::GetManaBonusFromIntellect() @@ -1033,20 +1033,8 @@ void Player::UpdateRuneRegen(RuneType rune) if (rune >= NUM_RUNE_TYPES) return; - uint32 cooldown = 0; - - for (uint32 i = 0; i < MAX_RUNES; ++i) - if (GetBaseRune(i) == rune) - { - cooldown = GetRuneBaseCooldown(i); - break; - } - - if (cooldown <= 0) - return; - - float regen = float(1 * IN_MILLISECONDS) / float(cooldown); - SetFloatValue(PLAYER_RUNE_REGEN_1 + uint8(rune), regen); + if (uint32 cooldown = GetRuneTypeBaseCooldown(rune)) + SetFloatValue(PLAYER_RUNE_REGEN_1 + uint8(rune), float(1 * IN_MILLISECONDS) / float(cooldown)); } void Player::_ApplyAllStatBonuses() diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 2f781409cac..715b79f477d 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -6632,6 +6632,10 @@ float Unit::SpellDamagePctDone(Unit* victim, SpellInfo const* spellProto, Damage return false; }); + // Add SPELL_AURA_MOD_DAMAGE_DONE_FOR_MECHANIC percent bonus + if (spellProto->Mechanic) + AddPct(DoneTotalMod, GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DAMAGE_DONE_FOR_MECHANIC, spellProto->Mechanic)); + // done scripted mod (take it from owner) Unit const* owner = GetOwner() ? GetOwner() : this; AuraEffectList const& mOverrideClassScript = owner->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); @@ -7932,6 +7936,10 @@ uint32 Unit::MeleeDamageBonusDone(Unit* victim, uint32 pdamage, WeaponAttackType return false; }); + // Add SPELL_AURA_MOD_DAMAGE_DONE_FOR_MECHANIC percent bonus + if (spellProto && spellProto->Mechanic) + AddPct(DoneTotalMod, GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DAMAGE_DONE_FOR_MECHANIC, spellProto->Mechanic)); + // done scripted mod (take it from owner) Unit* owner = GetOwner() ? GetOwner() : this; AuraEffectList const& mOverrideClassScript = owner->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); @@ -8432,9 +8440,9 @@ int32 Unit::ModifyPower(Powers power, int32 dVal, bool withPowerUpdate /*= true* int32 curPower = (int32)GetPower(power); int32 val = dVal + curPower; - if (val <= 0) + if (val <= GetMinPower(power)) { - SetPower(power, 0, withPowerUpdate); + SetPower(power, GetMinPower(power), withPowerUpdate); return -curPower; } @@ -12329,23 +12337,26 @@ uint32 Unit::GetModelForForm(ShapeshiftForm form, uint32 spellId) const } } // Female - else switch (skinColor) + else { - case 10: // White - return 29409; - case 6: // Light Brown - case 7: - return 29410; - case 4: // Brown - case 5: - return 29411; - case 0: // Dark - case 1: - case 2: - case 3: - return 29412; - default: // original - Grey - return 8571; + switch (skinColor) + { + case 10: // White + return 29409; + case 6: // Light Brown + case 7: + return 29410; + case 4: // Brown + case 5: + return 29411; + case 0: // Dark + case 1: + case 2: + case 3: + return 29412; + default: // original - Grey + return 8571; + } } } else if (Player::TeamForRace(GetRace()) == ALLIANCE) @@ -12407,23 +12418,26 @@ uint32 Unit::GetModelForForm(ShapeshiftForm form, uint32 spellId) const } } // Female - else switch (skinColor) + else { - case 0: // Dark (Black) - case 1: - return 29418; - case 2: // White - case 3: - return 29419; - case 6: // Light Brown/Grey - case 7: - case 8: - case 9: - return 29420; - case 10: // Completly White - return 29421; - default: // original - Brown - return 2289; + switch (skinColor) + { + case 0: // Dark (Black) + case 1: + return 29418; + case 2: // White + case 3: + return 29419; + case 6: // Light Brown/Grey + case 7: + case 8: + case 9: + return 29420; + case 10: // Completly White + return 29421; + default: // original - Brown + return 2289; + } } } else if (Player::TeamForRace(GetRace()) == ALLIANCE) diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 5e71f3f3ed8..e5495134252 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -931,6 +931,7 @@ class TC_GAME_API Unit : public WorldObject void SetPowerType(Powers power, bool sendUpdate = true); void UpdateDisplayPower(); uint32 GetPower(Powers power) const { return GetUInt32Value(UNIT_FIELD_POWER1 + int32(power)); } + int32 GetMinPower(Powers /*power*/) const { return 0; } uint32 GetMaxPower(Powers power) const { return GetUInt32Value(UNIT_FIELD_MAXPOWER1 + int32(power)); } float GetPowerPct(Powers power) const { return GetMaxPower(power) ? 100.f * GetPower(power) / GetMaxPower(power) : 0.0f; } int32 CountPctFromMaxPower(Powers power, int32 pct) const { return CalculatePct(GetMaxPower(power), pct); } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index ec6301829d4..41aa94a6d2d 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -6847,8 +6847,8 @@ uint32 ObjectMgr::GetNearestTaxiNode(float x, float y, float z, uint32 mapid, ui if (!node || node->ContinentID != mapid || (!node->MountCreatureID[team == ALLIANCE ? 1 : 0] && node->MountCreatureID[0] != 32981)) // dk flight continue; - uint8 field = (uint8)((i - 1) / 32); - uint32 submask = 1<<((i-1)%32); + uint32 field = uint32((node->ID - 1) / (sizeof(TaxiMask::value_type) * 8)); + TaxiMask::value_type submask = TaxiMask::value_type(1 << ((node->ID - 1) % (sizeof(TaxiMask::value_type) * 8))); // skip not taxi network nodes if ((sTaxiNodesMask[field] & submask) == 0) @@ -9705,7 +9705,7 @@ bool ObjectMgr::RemoveVendorItem(uint32 entry, uint32 item, bool persist /*= tru return true; } -bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 maxcount, uint32 incrtime, uint32 ExtendedCost, Player* player, std::set<uint32>* skip_vendors, uint32 ORnpcflag) const +bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount, uint32 incrtime, uint32 ExtendedCost, Player* player, std::set<uint32>* skip_vendors, uint32 ORnpcflag) const { CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(vendor_entry); if (!cInfo) @@ -9732,12 +9732,12 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max return false; } - if (!sObjectMgr->GetItemTemplate(item_id)) + if (!sObjectMgr->GetItemTemplate(id)) { if (player) - ChatHandler(player->GetSession()).PSendSysMessage(LANG_ITEM_NOT_FOUND, item_id); + ChatHandler(player->GetSession()).PSendSysMessage(LANG_ITEM_NOT_FOUND, id); else - TC_LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` for Vendor (Entry: {}) have in item list non-existed item ({}), ignore", vendor_entry, item_id); + TC_LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` for Vendor (Entry: {}) have in item list non-existed item ({}), ignore", vendor_entry, id); return false; } @@ -9746,7 +9746,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (player) ChatHandler(player->GetSession()).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST, ExtendedCost); else - TC_LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` has Item (Entry: {}) with wrong ExtendedCost ({}) for vendor ({}), ignore", item_id, ExtendedCost, vendor_entry); + TC_LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` has Item (Entry: {}) with wrong ExtendedCost ({}) for vendor ({}), ignore", id, ExtendedCost, vendor_entry); return false; } @@ -9755,7 +9755,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (player) ChatHandler(player->GetSession()).PSendSysMessage("MaxCount != 0 (%u) but IncrTime == 0", maxcount); else - TC_LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` has `maxcount` ({}) for item {} of vendor (Entry: {}) but `incrtime`=0, ignore", maxcount, item_id, vendor_entry); + TC_LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` has `maxcount` ({}) for item {} of vendor (Entry: {}) but `incrtime`=0, ignore", maxcount, id, vendor_entry); return false; } else if (maxcount == 0 && incrtime > 0) @@ -9763,7 +9763,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (player) ChatHandler(player->GetSession()).PSendSysMessage("MaxCount == 0 but IncrTime<>= 0"); else - TC_LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` has `maxcount`=0 for item {} of vendor (Entry: {}) but `incrtime`<>0, ignore", item_id, vendor_entry); + TC_LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` has `maxcount`=0 for item {} of vendor (Entry: {}) but `incrtime`<>0, ignore", id, vendor_entry); return false; } @@ -9771,12 +9771,12 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (!vItems) return true; // later checks for non-empty lists - if (vItems->FindItemCostPair(item_id, ExtendedCost)) + if (vItems->FindItemCostPair(id, ExtendedCost)) { if (player) - ChatHandler(player->GetSession()).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, item_id, ExtendedCost); + ChatHandler(player->GetSession()).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, id, ExtendedCost); else - TC_LOG_ERROR("sql.sql", "Table `npc_vendor` has duplicate items {} (with extended cost {}) for vendor (Entry: {}), ignoring", item_id, ExtendedCost, vendor_entry); + TC_LOG_ERROR("sql.sql", "Table `npc_vendor` has duplicate items {} (with extended cost {}) for vendor (Entry: {}), ignoring", id, ExtendedCost, vendor_entry); return false; } diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index cdd1981ada0..46c7a273a6a 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -966,7 +966,7 @@ class TC_GAME_API ObjectMgr GameObjectTemplate const* GetGameObjectTemplate(uint32 entry) const; GameObjectTemplateContainer const& GetGameObjectTemplates() const { return _gameObjectTemplateStore; } - uint32 LoadReferenceVendor(int32 vendor, int32 item_id, std::set<uint32>* skip_vendors); + uint32 LoadReferenceVendor(int32 vendor, int32 item, std::set<uint32>* skip_vendors); void LoadGameObjectTemplate(); void LoadGameObjectTemplateAddons(); @@ -1489,7 +1489,7 @@ class TC_GAME_API ObjectMgr } void AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedCost, bool persist = true); // for event bool RemoveVendorItem(uint32 entry, uint32 item, bool persist = true); // for event - bool IsVendorItemValid(uint32 vendor_entry, uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* player = nullptr, std::set<uint32>* skip_vendors = nullptr, uint32 ORnpcflag = 0) const; + bool IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* player = nullptr, std::set<uint32>* skip_vendors = nullptr, uint32 ORnpcflag = 0) const; void LoadScriptNames(); ScriptNameContainer const& GetAllScriptNames() const; diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 9dcc3cdfd77..68cced98d21 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -796,13 +796,13 @@ bool Guild::PlayerMoveItemData::InitItem() // Anti-WPE protection. Do not move non-empty bags to bank. if (m_pItem->IsNotEmptyBag()) { - m_pPlayer->SendEquipError(EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS, m_pItem); + m_pPlayer->SendEquipError(EQUIP_ERR_DESTROY_NONEMPTY_BAG, m_pItem); m_pItem = nullptr; } // Bound items cannot be put into bank. else if (!m_pItem->CanBeTraded()) { - m_pPlayer->SendEquipError(EQUIP_ERR_ITEMS_CANT_BE_SWAPPED, m_pItem); + m_pPlayer->SendEquipError(EQUIP_ERR_CANT_SWAP, m_pItem); m_pItem = nullptr; } } @@ -1029,11 +1029,11 @@ InventoryResult Guild::BankMoveItemData::CanStore(Item* pItem, bool swap) uint32 count = pItem->GetCount(); // Soulbound items cannot be moved if (pItem->IsSoulBound()) - return EQUIP_ERR_CANT_DROP_SOULBOUND; + return EQUIP_ERR_DROP_BOUND_ITEM; // Make sure destination bank tab exists if (m_container >= m_pGuild->_GetPurchasedTabsSize()) - return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; + return EQUIP_ERR_WRONG_BAG_TYPE; // Slot explicitely specified. Check it. if (m_slotId != NULL_SLOT) @@ -1044,7 +1044,7 @@ InventoryResult Guild::BankMoveItemData::CanStore(Item* pItem, bool swap) pItemDest = nullptr; if (!_ReserveSpace(m_slotId, pItem, pItemDest, count)) - return EQUIP_ERR_ITEM_CANT_STACK; + return EQUIP_ERR_CANT_STACK; if (count == 0) return EQUIP_ERR_OK; diff --git a/src/server/game/Handlers/BankHandler.cpp b/src/server/game/Handlers/BankHandler.cpp index 745f131b824..1c306cc6707 100644 --- a/src/server/game/Handlers/BankHandler.cpp +++ b/src/server/game/Handlers/BankHandler.cpp @@ -83,7 +83,7 @@ void WorldSession::HandleAutoBankItemOpcode(WorldPackets::Bank::AutoBankItem& pa if (dest.size() == 1 && dest[0].pos == item->GetPos()) { - _player->SendEquipError(EQUIP_ERR_NONE, item, nullptr); + _player->SendEquipError(EQUIP_ERR_CANT_SWAP, item, nullptr); return; } diff --git a/src/server/game/Handlers/GuildHandler.cpp b/src/server/game/Handlers/GuildHandler.cpp index fe27bac75eb..29e6df57af3 100644 --- a/src/server/game/Handlers/GuildHandler.cpp +++ b/src/server/game/Handlers/GuildHandler.cpp @@ -332,7 +332,7 @@ void WorldSession::HandleGuildBankSwapItems(WorldPackets::Guild::GuildBankSwapIt // Player <-> Bank // Allow to work with inventory only if (!Player::IsInventoryPos(playerBag, playerSlotId) && !(playerBag == NULL_BAG && playerSlotId == NULL_SLOT)) - GetPlayer()->SendEquipError(EQUIP_ERR_NONE, nullptr); + GetPlayer()->SendEquipError(EQUIP_ERR_INTERNAL_BAG_ERROR, nullptr); else guild->SwapItemsWithInventory(GetPlayer(), toChar != 0, packet.BankTab, packet.BankSlot, playerBag, playerSlotId, splitedAmount); } diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index bd12131c11b..289cda94883 100644 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -56,7 +56,7 @@ void WorldSession::HandleSplitItemOpcode(WorldPacket& recvData) if (!_player->IsValidPos(dstbag, dstslot, false)) // can be autostore pos { - _player->SendEquipError(EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, nullptr, nullptr); + _player->SendEquipError(EQUIP_ERR_WRONG_SLOT, nullptr, nullptr); return; } @@ -83,7 +83,7 @@ void WorldSession::HandleSwapInvItemOpcode(WorldPacket& recvData) if (!_player->IsValidPos(INVENTORY_SLOT_BAG_0, dstslot, true)) { - _player->SendEquipError(EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, nullptr, nullptr); + _player->SendEquipError(EQUIP_ERR_WRONG_SLOT, nullptr, nullptr); return; } @@ -147,7 +147,7 @@ void WorldSession::HandleSwapItem(WorldPacket& recvData) if (!_player->IsValidPos(dstbag, dstslot, true)) { - _player->SendEquipError(EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, nullptr, nullptr); + _player->SendEquipError(EQUIP_ERR_WRONG_SLOT, nullptr, nullptr); return; } @@ -295,7 +295,7 @@ void WorldSession::HandleDestroyItemOpcode(WorldPacket& recvData) if (pItem->GetTemplate()->HasFlag(ITEM_FLAG_NO_USER_DESTROY)) { - _player->SendEquipError(EQUIP_ERR_CANT_DROP_SOULBOUND, nullptr, nullptr); + _player->SendEquipError(EQUIP_ERR_DROP_BOUND_ITEM, nullptr, nullptr); return; } @@ -700,7 +700,7 @@ void WorldSession::HandleAutoStoreBagItemOpcode(WorldPacket& recvData) if (!_player->IsValidPos(dstbag, NULL_SLOT, false)) // can be autostore pos { - _player->SendEquipError(EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, nullptr, nullptr); + _player->SendEquipError(EQUIP_ERR_WRONG_SLOT, nullptr, nullptr); return; } @@ -729,7 +729,7 @@ void WorldSession::HandleAutoStoreBagItemOpcode(WorldPacket& recvData) if (dest.size() == 1 && dest[0].pos == src) { // just remove grey item state - _player->SendEquipError(EQUIP_ERR_NONE, pItem, nullptr); + _player->SendEquipError(EQUIP_ERR_INTERNAL_BAG_ERROR, pItem, nullptr); return; } @@ -741,7 +741,7 @@ void WorldSession::HandleSetAmmoOpcode(WorldPacket& recvData) { if (!_player->IsAlive()) { - _player->SendEquipError(EQUIP_ERR_YOU_ARE_DEAD, nullptr, nullptr); + _player->SendEquipError(EQUIP_ERR_PLAYER_DEAD, nullptr, nullptr); return; } @@ -843,44 +843,44 @@ void WorldSession::HandleWrapItemOpcode(WorldPacket& recvData) if (item == gift) // not possable with pacjket from real client { - _player->SendEquipError(EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED, item, nullptr); + _player->SendEquipError(EQUIP_ERR_CANT_WRAP_WRAPPED, item, nullptr); return; } if (item->IsEquipped()) { - _player->SendEquipError(EQUIP_ERR_EQUIPPED_CANT_BE_WRAPPED, item, nullptr); + _player->SendEquipError(EQUIP_ERR_CANT_WRAP_EQUIPPED, item, nullptr); return; } if (!item->GetGuidValue(ITEM_FIELD_GIFTCREATOR).IsEmpty()) // HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPED); { - _player->SendEquipError(EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED, item, nullptr); + _player->SendEquipError(EQUIP_ERR_CANT_WRAP_WRAPPED, item, nullptr); return; } if (item->IsBag()) { - _player->SendEquipError(EQUIP_ERR_BAGS_CANT_BE_WRAPPED, item, nullptr); + _player->SendEquipError(EQUIP_ERR_CANT_WRAP_BAGS, item, nullptr); return; } if (item->IsSoulBound()) { - _player->SendEquipError(EQUIP_ERR_BOUND_CANT_BE_WRAPPED, item, nullptr); + _player->SendEquipError(EQUIP_ERR_CANT_WRAP_BOUND, item, nullptr); return; } if (item->GetMaxStackCount() != 1) { - _player->SendEquipError(EQUIP_ERR_STACKABLE_CANT_BE_WRAPPED, item, nullptr); + _player->SendEquipError(EQUIP_ERR_CANT_WRAP_STACKABLE, item, nullptr); return; } // maybe not correct check (it is better than nothing) - if (item->GetTemplate()->MaxCount>0) + if (item->GetTemplate()->MaxCount > 0) { - _player->SendEquipError(EQUIP_ERR_UNIQUE_CANT_BE_WRAPPED, item, nullptr); + _player->SendEquipError(EQUIP_ERR_CANT_WRAP_UNIQUE, item, nullptr); return; } diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp index 590e62774b5..d41d1b2aaa3 100644 --- a/src/server/game/Handlers/LootHandler.cpp +++ b/src/server/game/Handlers/LootHandler.cpp @@ -455,12 +455,12 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket& recvData) ItemPosCountVec dest; InventoryResult msg = target->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, item.itemid, item.count); if (!item.AllowedForPlayer(target, true)) - msg = EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM; + msg = EQUIP_ERR_CANT_EQUIP_EVER; if (msg != EQUIP_ERR_OK) { - if (msg == EQUIP_ERR_CANT_CARRY_MORE_OF_THIS) + if (msg == EQUIP_ERR_ITEM_MAX_COUNT) _player->SendLootError(lootguid, LOOT_ERROR_MASTER_UNIQUE_ITEM); - else if (msg == EQUIP_ERR_INVENTORY_FULL) + else if (msg == EQUIP_ERR_INV_FULL) _player->SendLootError(lootguid, LOOT_ERROR_MASTER_INV_FULL); else _player->SendLootError(lootguid, LOOT_ERROR_MASTER_OTHER); diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp index 858b35f6ac2..22fe050c80d 100644 --- a/src/server/game/Handlers/MailHandler.cpp +++ b/src/server/game/Handlers/MailHandler.cpp @@ -194,7 +194,7 @@ void WorldSession::HandleSendMail(WorldPackets::Mail::SendMail& sendMail) // handle empty bag before CanBeTraded, since that func already has that check if (item->IsNotEmptyBag()) { - player->SendMailResult(0, MAIL_SEND, MAIL_ERR_EQUIP_ERROR, EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS); + player->SendMailResult(0, MAIL_SEND, MAIL_ERR_EQUIP_ERROR, EQUIP_ERR_DESTROY_NONEMPTY_BAG); return; } @@ -206,7 +206,7 @@ void WorldSession::HandleSendMail(WorldPackets::Mail::SendMail& sendMail) if (item->IsBoundAccountWide() && item->IsSoulBound() && GetAccountId() != receiverAccountId) { - player->SendMailResult(0, MAIL_SEND, MAIL_ERR_EQUIP_ERROR, EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS); + player->SendMailResult(0, MAIL_SEND, MAIL_ERR_EQUIP_ERROR, EQUIP_ERR_NOT_SAME_ACCOUNT); return; } diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 06aab37890c..56d99a85012 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -181,7 +181,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket) // additional check, client outputs message on its own if (!player->IsAlive()) { - player->SendEquipError(EQUIP_ERR_YOU_ARE_DEAD, nullptr, nullptr); + player->SendEquipError(EQUIP_ERR_PLAYER_DEAD, nullptr, nullptr); return; } @@ -207,7 +207,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket) // Verify that the bag is an actual bag or wrapped item that can be used "normally" if (!proto->HasFlag(ITEM_FLAG_HAS_LOOT) && !item->IsWrapped()) { - player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, nullptr); + player->SendEquipError(EQUIP_ERR_CLIENT_LOCKED_OUT, item, nullptr); TC_LOG_ERROR("entities.player.cheat", "Possible hacking attempt: Player {} {} tried to open item [{}, entry: {}] which is not openable!", player->GetName(), player->GetGUID().ToString(), item->GetGUID().ToString(), proto->ItemId); return; diff --git a/src/server/game/Handlers/TaxiHandler.cpp b/src/server/game/Handlers/TaxiHandler.cpp index 889a0114148..2a0f5ebaf4d 100644 --- a/src/server/game/Handlers/TaxiHandler.cpp +++ b/src/server/game/Handlers/TaxiHandler.cpp @@ -91,12 +91,12 @@ void WorldSession::SendTaxiMenu(Creature* unit) { // find current node uint32 curloc = sObjectMgr->GetNearestTaxiNode(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ(), unit->GetMapId(), GetPlayer()->GetTeam()); - - if (curloc == 0) + if (!curloc) return; bool lastTaxiCheaterState = GetPlayer()->isTaxiCheater(); - if (unit->GetEntry() == 29480) GetPlayer()->SetTaxiCheater(true); // Grimwing in Ebon Hold, special case. NOTE: Not perfect, Zul'Aman should not be included according to WoWhead, and I think taxicheat includes it. + if (unit->GetEntry() == 29480) + GetPlayer()->SetTaxiCheater(true); // Grimwing in Ebon Hold, special case. NOTE: Not perfect, Zul'Aman should not be included according to WoWhead, and I think taxicheat includes it. TC_LOG_DEBUG("network", "WORLD: CMSG_TAXINODE_STATUS_QUERY {} ", curloc); diff --git a/src/server/game/Handlers/TradeHandler.cpp b/src/server/game/Handlers/TradeHandler.cpp index 4d8588bf7be..9b02adb6c86 100644 --- a/src/server/game/Handlers/TradeHandler.cpp +++ b/src/server/game/Handlers/TradeHandler.cpp @@ -327,7 +327,7 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/) if (item->IsBindedNotWith(trader)) { info.Status = TRADE_STATUS_CLOSE_WINDOW; - info.Result = EQUIP_ERR_CANNOT_TRADE_THAT; + info.Result = EQUIP_ERR_TRADE_BOUND_ITEM; SendTradeStatus(info); return; } diff --git a/src/server/game/Spells/Auras/SpellAuraDefines.h b/src/server/game/Spells/Auras/SpellAuraDefines.h index ef2138eb879..f6c0dc170e1 100644 --- a/src/server/game/Spells/Auras/SpellAuraDefines.h +++ b/src/server/game/Spells/Auras/SpellAuraDefines.h @@ -353,7 +353,7 @@ enum AuraType : uint32 SPELL_AURA_X_RAY = 273, SPELL_AURA_ABILITY_CONSUME_NO_AMMO = 274, SPELL_AURA_MOD_IGNORE_SHAPESHIFT = 275, - SPELL_AURA_MOD_DAMAGE_DONE_FOR_MECHANIC = 276, // NYI + SPELL_AURA_MOD_DAMAGE_DONE_FOR_MECHANIC = 276, SPELL_AURA_MOD_MAX_AFFECTED_TARGETS = 277, SPELL_AURA_MOD_DISARM_RANGED = 278, SPELL_AURA_INITIALIZE_IMAGES = 279, diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 7458e62ec94..b33ffa86fea 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -951,7 +951,7 @@ uint8 Aura::CalcMaxCharges(Unit* caster) const if (Player* modOwner = caster->GetSpellModOwner()) modOwner->ApplySpellMod(GetId(), SPELLMOD_CHARGES, maxProcCharges); - return maxProcCharges; + return uint8(maxProcCharges); } bool Aura::ModCharges(int32 num, AuraRemoveMode removeMode) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 6ca71f2cbb0..446f4ff3a1c 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -6824,7 +6824,7 @@ SpellCastResult Spell::CheckItems(uint32* param1 /*= nullptr*/, uint32* param2 / if (spellEffectInfo.IsEffect(SPELL_EFFECT_CREATE_ITEM_2)) if (target->ToPlayer()->GetFreeInventorySpace() == 0) { - player->SendEquipError(EQUIP_ERR_INVENTORY_FULL, nullptr, nullptr, spellEffectInfo.ItemType); + player->SendEquipError(EQUIP_ERR_INV_FULL, nullptr, nullptr, spellEffectInfo.ItemType); return SPELL_FAILED_DONT_REPORT; } diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 58098c7f1a7..a6317dbe9f3 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1463,7 +1463,7 @@ void Spell::DoCreateItem(uint32 itemId) if (msg != EQUIP_ERR_OK) { // convert to possible store amount - if (msg == EQUIP_ERR_INVENTORY_FULL || msg == EQUIP_ERR_CANT_CARRY_MORE_OF_THIS) + if (msg == EQUIP_ERR_INV_FULL || msg == EQUIP_ERR_ITEM_MAX_COUNT) num_to_add -= no_space; else { @@ -1980,9 +1980,9 @@ void Spell::EffectSummonChangeItem() InventoryResult msg = player->CanEquipItem(m_CastItem->GetSlot(), dest, pNewItem, true); - if (msg == EQUIP_ERR_OK || msg == EQUIP_ERR_CANT_DO_RIGHT_NOW) + if (msg == EQUIP_ERR_OK || msg == EQUIP_ERR_CLIENT_LOCKED_OUT) { - if (msg == EQUIP_ERR_CANT_DO_RIGHT_NOW) dest = EQUIPMENT_SLOT_MAINHAND; + if (msg == EQUIP_ERR_CLIENT_LOCKED_OUT) dest = EQUIPMENT_SLOT_MAINHAND; // prevent crash at access and unexpected charges counting with item update queue corrupt if (m_CastItem == m_targets.GetItemTarget()) diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 6f080491ef8..48ae954b080 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -405,7 +405,7 @@ bool SpellEffectInfo::IsAura() const bool SpellEffectInfo::IsAura(AuraType aura) const { - return IsAura() && ApplyAuraName == uint32(aura); + return IsAura() && ApplyAuraName == aura; } bool SpellEffectInfo::IsTargetingArea() const diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index 89417cb3362..5a82e210f5a 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -77,7 +77,7 @@ public: return false; // error - player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, nullptr); + player->SendEquipError(EQUIP_ERR_CLIENT_LOCKED_OUT, item, nullptr); return true; } }; @@ -178,7 +178,7 @@ public: player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, nullptr); } else - player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, nullptr); + player->SendEquipError(EQUIP_ERR_CLIENT_LOCKED_OUT, item, nullptr); return true; } }; diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 31c4702224e..77b6f3a6f45 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -409,7 +409,7 @@ void ProcessUnlearnAction(Player* player, Creature* creature, uint32 spellId, ui player->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, creature, 0, 0); } else - player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, nullptr, nullptr); + player->SendEquipError(EQUIP_ERR_CLIENT_LOCKED_OUT, nullptr, nullptr); CloseGossipMenuFor(player); } |