mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-30 17:58:16 +00:00
Eliminated the nested class design of recent EQEmu work; Some more inv2 convergence work
This commit is contained in:
@@ -485,7 +485,7 @@ int32 Client::GetRawItemAC()
|
||||
{
|
||||
int32 Total = 0;
|
||||
// this skips MainAmmo..add an '=' conditional if that slot is required (original behavior)
|
||||
for (int16 slot_id = EQEmu::Constants::EQUIPMENT_BEGIN; slot_id < EQEmu::Constants::EQUIPMENT_END; slot_id++) {
|
||||
for (int16 slot_id = EQEmu::constants::EQUIPMENT_BEGIN; slot_id < EQEmu::constants::EQUIPMENT_END; slot_id++) {
|
||||
const ItemInst* inst = m_inv[slot_id];
|
||||
if (inst && inst->IsType(ItemClassCommon)) {
|
||||
Total += inst->GetItem()->AC;
|
||||
@@ -1306,7 +1306,7 @@ uint32 Client::CalcCurrentWeight()
|
||||
ItemInst* ins;
|
||||
uint32 Total = 0;
|
||||
int x;
|
||||
for (x = EQEmu::Constants::EQUIPMENT_BEGIN; x <= SlotCursor; x++) { // include cursor or not?
|
||||
for (x = EQEmu::constants::EQUIPMENT_BEGIN; x <= SlotCursor; x++) { // include cursor or not?
|
||||
TempItem = 0;
|
||||
ins = GetInv().GetItem(x);
|
||||
if (ins) {
|
||||
@@ -1316,7 +1316,7 @@ uint32 Client::CalcCurrentWeight()
|
||||
Total += TempItem->Weight;
|
||||
}
|
||||
}
|
||||
for (x = EQEmu::Constants::GENERAL_BAGS_BEGIN; x <= EQEmu::Constants::GENERAL_BAGS_END; x++) { // include cursor bags or not?
|
||||
for (x = EQEmu::constants::GENERAL_BAGS_BEGIN; x <= EQEmu::constants::GENERAL_BAGS_END; x++) { // include cursor bags or not?
|
||||
int TmpWeight = 0;
|
||||
TempItem = 0;
|
||||
ins = GetInv().GetItem(x);
|
||||
@@ -1331,7 +1331,7 @@ uint32 Client::CalcCurrentWeight()
|
||||
// is this correct? or can we scan for the highest weight redux and use that? (need client verifications)
|
||||
int bagslot = SlotGeneral1;
|
||||
int reduction = 0;
|
||||
for (int m = EQEmu::Constants::GENERAL_BAGS_BEGIN + 10; m <= EQEmu::Constants::GENERAL_BAGS_END; m += 10) { // include cursor bags or not?
|
||||
for (int m = EQEmu::constants::GENERAL_BAGS_BEGIN + 10; m <= EQEmu::constants::GENERAL_BAGS_END; m += 10) { // include cursor bags or not?
|
||||
if (x >= m) {
|
||||
bagslot += 1;
|
||||
}
|
||||
@@ -1355,7 +1355,7 @@ uint32 Client::CalcCurrentWeight()
|
||||
This is the ONLY instance I have seen where the client is hard coded to particular Item IDs to set a certain property for an item. It is very odd.
|
||||
*/
|
||||
// SoD+ client has no weight for coin
|
||||
if (EQEmu::Limits::CoinHasWeight(GetClientVersion())) {
|
||||
if (EQEmu::limits::CoinHasWeight(GetClientVersion())) {
|
||||
Total += (m_pp.platinum + m_pp.gold + m_pp.silver + m_pp.copper) / 4;
|
||||
}
|
||||
float Packrat = (float)spellbonuses.Packrat + (float)aabonuses.Packrat + (float)itembonuses.Packrat;
|
||||
@@ -2210,7 +2210,7 @@ int Client::GetRawACNoShield(int &shield_ac) const
|
||||
if (inst->GetItem()->ItemType == ItemTypeShield) {
|
||||
ac -= inst->GetItem()->AC;
|
||||
shield_ac = inst->GetItem()->AC;
|
||||
for (uint8 i = AUG_BEGIN; i < EQEmu::Constants::ITEM_COMMON_SIZE; i++) {
|
||||
for (uint8 i = AUG_INDEX_BEGIN; i < EQEmu::constants::ITEM_COMMON_SIZE; i++) {
|
||||
if (inst->GetAugment(i)) {
|
||||
ac -= inst->GetAugment(i)->GetItem()->AC;
|
||||
shield_ac += inst->GetAugment(i)->GetItem()->AC;
|
||||
|
||||
Reference in New Issue
Block a user