summaryrefslogtreecommitdiffstats
path: root/src/game-server/inventory.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2008-01-07 22:07:10 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2008-01-07 22:07:10 +0000
commitc1d99cc23ca3108c74ad897c9a3485701aae1220 (patch)
tree013ad38134d92df7b4f3d55c9b36b6c047b68d70 /src/game-server/inventory.cpp
parentab00efb5c42b32a497fd56103dff7cc97b309ca8 (diff)
downloadmanaserv-c1d99cc23ca3108c74ad897c9a3485701aae1220.tar.gz
manaserv-c1d99cc23ca3108c74ad897c9a3485701aae1220.tar.xz
manaserv-c1d99cc23ca3108c74ad897c9a3485701aae1220.zip
Implemented some of the game mechanics we decided to use. The clients now only receive attribute change messages when the attribute actually changed. Left the HP mechanics as they are for now (although I consider them flawed).
Diffstat (limited to 'src/game-server/inventory.cpp')
-rw-r--r--src/game-server/inventory.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game-server/inventory.cpp b/src/game-server/inventory.cpp
index c2dc8ba..31f3b17 100644
--- a/src/game-server/inventory.cpp
+++ b/src/game-server/inventory.cpp
@@ -596,7 +596,7 @@ int Inventory::move(int slot1, int slot2, int amount)
mPoss->inventory.insert(mPoss->inventory.end(), it);
}
InventoryItem it = { id, nb };
- mPoss->inventory.insert(mPoss->inventory.end(), it);
+ mPoss->inventory.insert(mPoss->inventory.end(), it);
return amount;
}
@@ -682,6 +682,9 @@ void Inventory::changeEquipment(int slot, int itemId)
msg.writeShort(itemId);
mPoss->equipment[slot] = itemId;
mChangedLook = true;
+
+ //mark evade as modified because it depends on equipment weight
+ mClient->modifiedAttribute(BASE_ATTR_EVADE);
}
void Inventory::equip(int slot)