*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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user