summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2008-08-10 21:35:17 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2008-08-10 21:35:17 +0000
commit4e800b21494755958b0e30bba9045cee204b1a76 (patch)
treeb7de9caef60d06ad0f6e3f053eb5b0bda81decd6 /src
parentb23287bb39b0a823b578b9e6d5fa4e4bbbc3b451 (diff)
downloadmanaserv-4e800b21494755958b0e30bba9045cee204b1a76.tar.gz
manaserv-4e800b21494755958b0e30bba9045cee204b1a76.tar.bz2
manaserv-4e800b21494755958b0e30bba9045cee204b1a76.tar.xz
manaserv-4e800b21494755958b0e30bba9045cee204b1a76.zip
Corrected the way weapon skills is taken into account in damage calculation.
Diffstat (limited to 'src')
-rw-r--r--src/game-server/character.cpp6
1 files changed, 3 insertions, 3 deletions
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);