Created
July 9, 2014 02:23
-
-
Save mackal/0cf53d94e6762c15e481 to your computer and use it in GitHub Desktop.
stdin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/zone/mob.cpp b/zone/mob.cpp | |
index 340dfdf..bc695ac 100644 | |
--- a/zone/mob.cpp | |
+++ b/zone/mob.cpp | |
@@ -4726,26 +4726,22 @@ bool Mob::PassLimitToSkill(uint16 spell_id, uint16 skill) { | |
return false; | |
} | |
-uint16 Mob::GetWeaponSpeedbyHand(uint16 hand) { | |
- | |
- uint16 weapon_speed = 0; | |
+uint16 Mob::GetWeaponSpeedbyHand(uint16 hand) | |
+{ | |
+ uint16 weapon_speed = RuleI(Combat, MinHastedDelay); | |
switch (hand) { | |
- | |
case 13: | |
- weapon_speed = attack_timer.GetDuration(); | |
- break; | |
+ return std::max(weapon_speed, | |
+ static_cast<uint16>(attack_timer.GetDuration())); | |
case 14: | |
- weapon_speed = attack_dw_timer.GetDuration(); | |
- break; | |
+ return std::max(weapon_speed, | |
+ static_cast<uint16>(attack_dw_timer.GetDuration())); | |
case 11: | |
- weapon_speed = ranged_timer.GetDuration(); | |
- break; | |
+ return std::max(weapon_speed, | |
+ static_cast<uint16>(ranged_timer.GetDuration())); | |
+ default: | |
+ return weapon_speed; | |
} | |
- | |
- if (weapon_speed < RuleI(Combat, MinHastedDelay)) | |
- weapon_speed = RuleI(Combat, MinHastedDelay); | |
- | |
- return weapon_speed; | |
} | |
int8 Mob::GetDecayEffectValue(uint16 spell_id, uint16 spelleffect) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment