summaryrefslogtreecommitdiff
path: root/src/game-server/monster.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-08-19 17:53:17 +0200
committerPhilipp Sehmisch <crush@themanaworld.org>2009-08-19 18:07:56 +0200
commit3327475b675bf94fd827ffd36838baa42a84f11b (patch)
tree074d052fec85537f28916c82f1f84f701736753d /src/game-server/monster.cpp
parente6471b3ffc2f4cc049184a979db7b02c41a8e475 (diff)
downloadmanaserv-3327475b675bf94fd827ffd36838baa42a84f11b.tar.gz
manaserv-3327475b675bf94fd827ffd36838baa42a84f11b.tar.bz2
manaserv-3327475b675bf94fd827ffd36838baa42a84f11b.tar.xz
manaserv-3327475b675bf94fd827ffd36838baa42a84f11b.zip
Removed attack shape from items. Added distance check on attacks (values still hardcoded). performAttack now takes a target and a range argument instead of determining the target with accumulate&fire
Diffstat (limited to 'src/game-server/monster.cpp')
-rw-r--r--src/game-server/monster.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game-server/monster.cpp b/src/game-server/monster.cpp
index d2267412..6b57ff42 100644
--- a/src/game-server/monster.cpp
+++ b/src/game-server/monster.cpp
@@ -115,14 +115,14 @@ void Monster::perform()
{
if (mAttackTime == mCurrentAttack->aftDelay)
{
- // Hard-coded values for now.
Damage damage;
damage.base = (int) (getModifiedAttribute(BASE_ATTR_PHY_ATK_MIN) * mCurrentAttack->damageFactor);
damage.delta = (int) (getModifiedAttribute(BASE_ATTR_PHY_ATK_DELTA) * mCurrentAttack->damageFactor);
damage.cth = getModifiedAttribute(BASE_ATTR_HIT);
damage.element = mCurrentAttack->element;
damage.type = mCurrentAttack->type;
- performAttack(damage);
+ // todo: get the attack range from monster DB
+ performAttack(mTarget, 64, damage);
}
if (!mAttackTime)
{