diff options
author | HoraK-FDF <horak-fdf@web.de> | 2022-12-08 16:41:33 +0000 |
---|---|---|
committer | HoraK-FDF <horak-fdf@web.de> | 2022-12-08 16:41:33 +0000 |
commit | dd1b92878ff452f920c2e7a6dc0a3201b068d07f (patch) | |
tree | 0b948daf657eaec402a6455d1d089510abb02ca2 | |
parent | e45243576e5775cb241fa79cbe2dba8b074e4ee8 (diff) | |
download | tmwa-dd1b92878ff452f920c2e7a6dc0a3201b068d07f.tar.gz tmwa-dd1b92878ff452f920c2e7a6dc0a3201b068d07f.tar.bz2 tmwa-dd1b92878ff452f920c2e7a6dc0a3201b068d07f.tar.xz tmwa-dd1b92878ff452f920c2e7a6dc0a3201b068d07f.zip |
Equipment stats
-rw-r--r-- | src/map/pc.cpp | 11 | ||||
-rw-r--r-- | src/mmo/clif.t.hpp | 14 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/map/pc.cpp b/src/map/pc.cpp index 4357e38..ce421d0 100644 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -3747,6 +3747,17 @@ int pc_readparam(dumb_ptr<block_list> bl, SP type) else val = battle_get_stat(type, bl); break; + case SP::STR2: + case SP::AGI2: + case SP::VIT2: + case SP::INT2: + case SP::DEX2: + case SP::LUK2: + if (sd) + val = sd->paramb[sp_to_attr(SP(static_cast<int>(type)-(static_cast<int>(SP::STR2)-static_cast<int>(SP::STR))))] + sd->parame[sp_to_attr(SP(static_cast<int>(type)-(static_cast<int>(SP::STR2)-static_cast<int>(SP::STR))))]; + else + val = battle_get_stat(SP(static_cast<int>(type)-(static_cast<int>(SP::STR2)-static_cast<int>(SP::STR))), bl); // not sure if mobs can have equipment with stats so i only return thier normal stat + break; case SP::SPEED: val = battle_get_speed(bl).count(); break; diff --git a/src/mmo/clif.t.hpp b/src/mmo/clif.t.hpp index 1d46342..f216064 100644 --- a/src/mmo/clif.t.hpp +++ b/src/mmo/clif.t.hpp @@ -316,6 +316,20 @@ enum class SP : uint16_t UNBREAKABLE = 60, #endif + // stats from equipment + STR2 = 61, + // sent to client + AGI2 = 62, + // sent to client + VIT2 = 63, + // sent to client + INT2 = 64, + // sent to client + DEX2 = 65, + // sent to client + LUK2 = 66, + // sent to client + DEAF = 70, // sent to client |