mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 15:00:25 +00:00
Rework of eq_dictionary
This commit is contained in:
+19
-19
@@ -296,7 +296,7 @@ bool Client::Process() {
|
||||
}
|
||||
|
||||
if(AutoFireEnabled()){
|
||||
ItemInst *ranged = GetInv().GetItem(MainRange);
|
||||
ItemInst *ranged = GetInv().GetItem(SlotRange);
|
||||
if(ranged)
|
||||
{
|
||||
if(ranged->GetItem() && ranged->GetItem()->ItemType == ItemTypeBow){
|
||||
@@ -391,10 +391,10 @@ bool Client::Process() {
|
||||
}
|
||||
else if (auto_attack_target->GetHP() > -10) // -10 so we can watch people bleed in PvP
|
||||
{
|
||||
ItemInst *wpn = GetInv().GetItem(MainPrimary);
|
||||
TryWeaponProc(wpn, auto_attack_target, MainPrimary);
|
||||
ItemInst *wpn = GetInv().GetItem(SlotPrimary);
|
||||
TryWeaponProc(wpn, auto_attack_target, SlotPrimary);
|
||||
|
||||
DoAttackRounds(auto_attack_target, MainPrimary);
|
||||
DoAttackRounds(auto_attack_target, SlotPrimary);
|
||||
if (CheckAATimer(aaTimerRampage))
|
||||
entity_list.AEAttack(this, 30);
|
||||
}
|
||||
@@ -430,10 +430,10 @@ bool Client::Process() {
|
||||
else if(auto_attack_target->GetHP() > -10) {
|
||||
CheckIncreaseSkill(SkillDualWield, auto_attack_target, -10);
|
||||
if (CheckDualWield()) {
|
||||
ItemInst *wpn = GetInv().GetItem(MainSecondary);
|
||||
TryWeaponProc(wpn, auto_attack_target, MainSecondary);
|
||||
ItemInst *wpn = GetInv().GetItem(SlotSecondary);
|
||||
TryWeaponProc(wpn, auto_attack_target, SlotSecondary);
|
||||
|
||||
DoAttackRounds(auto_attack_target, MainSecondary);
|
||||
DoAttackRounds(auto_attack_target, SlotSecondary);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -742,7 +742,7 @@ void Client::BulkSendInventoryItems() {
|
||||
|
||||
// LINKDEAD TRADE ITEMS
|
||||
// Move trade slot items back into normal inventory..need them there now for the proceeding validity checks
|
||||
for(slot_id = EmuConstants::TRADE_BEGIN; slot_id <= EmuConstants::TRADE_END; slot_id++) {
|
||||
for(slot_id = EQEmu::Constants::TRADE_BEGIN; slot_id <= EQEmu::Constants::TRADE_END; slot_id++) {
|
||||
ItemInst* inst = m_inv.PopItem(slot_id);
|
||||
if(inst) {
|
||||
bool is_arrow = (inst->GetItem()->ItemType == ItemTypeArrow) ? true : false;
|
||||
@@ -790,7 +790,7 @@ void Client::BulkSendInventoryItems() {
|
||||
std::map<uint16, std::string>::iterator itr;
|
||||
|
||||
//Inventory items
|
||||
for(slot_id = MAIN_BEGIN; slot_id < EmuConstants::MAP_POSSESSIONS_SIZE; slot_id++) {
|
||||
for(slot_id = SLOT_BEGIN; slot_id < EQEmu::Constants::TYPE_POSSESSIONS_SIZE; slot_id++) {
|
||||
const ItemInst* inst = m_inv[slot_id];
|
||||
if(inst) {
|
||||
std::string packet = inst->Serialize(slot_id);
|
||||
@@ -801,16 +801,16 @@ void Client::BulkSendInventoryItems() {
|
||||
|
||||
// Power Source
|
||||
if(GetClientVersion() >= ClientVersion::SoF) {
|
||||
const ItemInst* inst = m_inv[MainPowerSource];
|
||||
const ItemInst* inst = m_inv[SlotPowerSource];
|
||||
if(inst) {
|
||||
std::string packet = inst->Serialize(MainPowerSource);
|
||||
std::string packet = inst->Serialize(SlotPowerSource);
|
||||
ser_items[i++] = packet;
|
||||
size += packet.length();
|
||||
}
|
||||
}
|
||||
|
||||
// Bank items
|
||||
for(slot_id = EmuConstants::BANK_BEGIN; slot_id <= EmuConstants::BANK_END; slot_id++) {
|
||||
for(slot_id = EQEmu::Constants::BANK_BEGIN; slot_id <= EQEmu::Constants::BANK_END; slot_id++) {
|
||||
const ItemInst* inst = m_inv[slot_id];
|
||||
if(inst) {
|
||||
std::string packet = inst->Serialize(slot_id);
|
||||
@@ -820,7 +820,7 @@ void Client::BulkSendInventoryItems() {
|
||||
}
|
||||
|
||||
// Shared Bank items
|
||||
for(slot_id = EmuConstants::SHARED_BANK_BEGIN; slot_id <= EmuConstants::SHARED_BANK_END; slot_id++) {
|
||||
for(slot_id = EQEmu::Constants::SHARED_BANK_BEGIN; slot_id <= EQEmu::Constants::SHARED_BANK_END; slot_id++) {
|
||||
const ItemInst* inst = m_inv[slot_id];
|
||||
if(inst) {
|
||||
std::string packet = inst->Serialize(slot_id);
|
||||
@@ -851,14 +851,14 @@ void Client::BulkSendInventoryItems()
|
||||
if(deletenorent){//client was offline for more than 30 minutes, delete no rent items
|
||||
RemoveNoRent();
|
||||
}
|
||||
for (slot_id=EmuConstants::POSSESSIONS_BEGIN; slot_id<=EmuConstants::POSSESSIONS_END; slot_id++) {
|
||||
for (slot_id=EQEmu::Constants::POSSESSIONS_BEGIN; slot_id<=EQEmu::Constants::POSSESSIONS_END; slot_id++) {
|
||||
const ItemInst* inst = m_inv[slot_id];
|
||||
if (inst){
|
||||
SendItemPacket(slot_id, inst, ItemPacketCharInventory);
|
||||
}
|
||||
}
|
||||
// Bank items
|
||||
for (slot_id=EmuConstants::BANK_BEGIN; slot_id<=EmuConstants::BANK_END; slot_id++) { // 2015...
|
||||
for (slot_id=EQEmu::Constants::BANK_BEGIN; slot_id<=EQEmu::Constants::BANK_END; slot_id++) { // 2015...
|
||||
const ItemInst* inst = m_inv[slot_id];
|
||||
if (inst){
|
||||
SendItemPacket(slot_id, inst, ItemPacketCharInventory);
|
||||
@@ -866,7 +866,7 @@ void Client::BulkSendInventoryItems()
|
||||
}
|
||||
|
||||
// Shared Bank items
|
||||
for (slot_id=EmuConstants::SHARED_BANK_BEGIN; slot_id<=EmuConstants::SHARED_BANK_END; slot_id++) {
|
||||
for (slot_id=EQEmu::Constants::SHARED_BANK_BEGIN; slot_id<=EQEmu::Constants::SHARED_BANK_END; slot_id++) {
|
||||
const ItemInst* inst = m_inv[slot_id];
|
||||
if (inst){
|
||||
SendItemPacket(slot_id, inst, ItemPacketCharInventory);
|
||||
@@ -876,7 +876,7 @@ void Client::BulkSendInventoryItems()
|
||||
// LINKDEAD TRADE ITEMS
|
||||
// If player went LD during a trade, they have items in the trade inventory
|
||||
// slots. These items are now being put into their inventory (then queue up on cursor)
|
||||
for (int16 trade_slot_id=EmuConstants::TRADE_BEGIN; trade_slot_id<=EmuConstants::TRADE_END; trade_slot_id++) {
|
||||
for (int16 trade_slot_id=EQEmu::Constants::TRADE_BEGIN; trade_slot_id<=EQEmu::Constants::TRADE_END; trade_slot_id++) {
|
||||
const ItemInst* inst = m_inv[slot_id];
|
||||
if (inst) {
|
||||
int16 free_slot_id = m_inv.FindFreeSlot(inst->IsType(ItemClassContainer), true, inst->GetItem()->Size);
|
||||
@@ -1147,7 +1147,7 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
|
||||
switch(memspell->scribing)
|
||||
{
|
||||
case memSpellScribing: { // scribing spell to book
|
||||
const ItemInst* inst = m_inv[MainCursor];
|
||||
const ItemInst* inst = m_inv[SlotCursor];
|
||||
|
||||
if(inst && inst->IsType(ItemClassCommon))
|
||||
{
|
||||
@@ -1161,7 +1161,7 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
|
||||
if(item && item->Scroll.Effect == (int32)(memspell->spell_id))
|
||||
{
|
||||
ScribeSpell(memspell->spell_id, memspell->slot);
|
||||
DeleteItemInInventory(MainCursor, 1, true);
|
||||
DeleteItemInInventory(SlotCursor, 1, true);
|
||||
}
|
||||
else
|
||||
Message(0,"Scribing spell: inst exists but item does not or spell ids do not match.");
|
||||
|
||||
Reference in New Issue
Block a user