summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/game-server/character.cpp6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d06f8c9..4bf60b0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-10 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/game-server/character.cpp: Corrected the way weapon skills is taken into
+ account in damage calculation.
+
2008-08-04 Bjørn Lindeijer <bjorn@lindeijer.nl>
* src/game-server/mapreader.cpp, src/game-server/mapreader.hpp: Fixed
diff --git a/src/game-server/character.cpp b/src/game-server/character.cpp
index 46d7f5c5..37fb3b8c 100644
--- a/src/game-server/character.cpp
+++ b/src/game-server/character.cpp
@@ -95,9 +95,9 @@ void Character::perform()
int type = ic ? ic->getModifiers().getValue(MOD_WEAPON_TYPE) : WPNTYPE_NONE;
Damage damage;
- damage.base = getModifiedAttribute(BASE_ATTR_PHY_ATK_MIN) +
- (rand() % (getModifiedAttribute(CHAR_SKILL_WEAPON_BEGIN + type) + 1));
- damage.delta = getModifiedAttribute(BASE_ATTR_PHY_ATK_DELTA);
+ damage.base = getModifiedAttribute(BASE_ATTR_PHY_ATK_MIN);
+ damage.delta = getModifiedAttribute(BASE_ATTR_PHY_ATK_DELTA) +
+ getModifiedAttribute(CHAR_SKILL_WEAPON_BEGIN + type);
damage.type = DAMAGE_PHYSICAL;
damage.cth = getModifiedAttribute(BASE_ATTR_HIT) +
getModifiedAttribute(CHAR_SKILL_WEAPON_BEGIN + type);