diff options
| author | Rat <none@none> | 2009-08-04 12:38:35 +0200 |
|---|---|---|
| committer | Rat <none@none> | 2009-08-04 12:38:35 +0200 |
| commit | 35cf6778de1ff4e9c4b38e311bcb1552693c6e2c (patch) | |
| tree | b67213867560db31bf5c5c268772fb2372cb3670 /src/game | |
| parent | 73ce3bd36636a891cbf1e714b63e73a9f21fdc81 (diff) | |
*added script for training dummies
*added new creature extra flag (CREATURE_FLAG_EXTRA_NO_SKILLGAIN) if set creature won't increase player's weapon skill
--HG--
branch : trunk
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/Creature.h | 1 | ||||
| -rw-r--r-- | src/game/Player.cpp | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/game/Creature.h b/src/game/Creature.h index 61cb390b02f..d291aaf9db0 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -150,6 +150,7 @@ enum CreatureFlagsExtra CREATURE_FLAG_EXTRA_WORLDEVENT = 0x00004000, // custom flag for world event creatures (left room for merging) //CREATURE_FLAG_EXTRA_CHARM_AI = 0x00008000, // use ai when charmed CREATURE_FLAG_EXTRA_NO_CRIT = 0x00020000, // creature can't do critical strikes + CREATURE_FLAG_EXTRA_NO_SKILLGAIN = 0x00040000, // creature won't increase weapon skills }; enum SummonMask diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 6e92e7d4b6a..0b75d090152 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -5288,6 +5288,9 @@ void Player::UpdateWeaponSkill (WeaponAttackType attType) if(m_form == FORM_TREE) return; // use weapon but not skill up + if(pVictim && pVictim->GetTypeId() == TYPEID_UNIT && (((Creature*)pVictim)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_SKILLGAIN)) + return; + uint32 weapon_skill_gain = sWorld.getConfig(CONFIG_SKILL_GAIN_WEAPON); switch(attType) |
