diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-07-04 20:04:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-07-04 20:04:05 +0300 |
commit | c14af75fab3ddb45886a358e5056c2b0baee91e1 (patch) | |
tree | 8bc0979e70665db89c49b29d938ad7de376f4115 /src/being/being.cpp | |
parent | e0514307bfa5d7affb3dba5c8b61bf59b8bc3b81 (diff) | |
download | manaplus-c14af75fab3ddb45886a358e5056c2b0baee91e1.tar.gz manaplus-c14af75fab3ddb45886a358e5056c2b0baee91e1.tar.bz2 manaplus-c14af75fab3ddb45886a358e5056c2b0baee91e1.tar.xz manaplus-c14af75fab3ddb45886a358e5056c2b0baee91e1.zip |
Use skill type as bit mask with skill types.
It rare but still possible.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 4c750f5c8..cfb182355 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -1026,10 +1026,15 @@ void Being::handleSkill(Being *restrict const victim, if (this != localPlayer && skill) { const SkillType::SkillType type = skill->type; - if (type == SkillType::Attack || type == SkillType::Ground) + if ((type & SkillType::Attack) != 0 || + (type & SkillType::Ground) != 0) + { setAction(BeingAction::ATTACK, 1); + } else + { setAction(BeingAction::STAND, 1); + } } reset(); |