Created
February 1, 2014 11:12
-
-
Save nzatsepilov/8750872 to your computer and use it in GitHub Desktop.
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/src/game/Unit.cpp b/src/game/Unit.cpp | |
--- a/src/game/Unit.cpp | |
+++ b/src/game/Unit.cpp | |
@@ -810,16 +810,20 @@ void Unit::RemoveSpellbyDamageTaken(uint | |
if (*i && (!spell || (*i)->GetId() != spell)) | |
{ | |
if (SpellMgr::GetDiminishingReturnsGroupForSpell((*i)->GetSpellProto(), false) == DIMINISHING_ENSLAVE) | |
continue; | |
roll = roll_chance_f(chance); | |
if (roll) | |
{ | |
+ char debug_info[255]; | |
+ sprintf(debug_info, "%f%-й шанс снятия прокнул", chance); | |
+ MonsterSay(debug_info, LANG_UNIVERSAL, 0); | |
+ | |
m_damageTakenForRemoveSpell = 0; | |
aurasToRemove.push_back(auraPair); | |
} | |
} | |
} | |
for (std::list<std::pair<uint32, uint64> >::iterator i = aurasToRemove.begin(); i != aurasToRemove.end(); ++i) | |
RemoveAurasByCasterSpell(i->first, i->second); | |
@@ -3866,17 +3870,23 @@ int32 Unit::GetMaxNegativeAuraModifierBy | |
} | |
return modifier; | |
} | |
bool Unit::AddAura(Aura *Aur) | |
{ | |
if (Aur->GetSpellProto()->Attributes & SPELL_ATTR_BREAKABLE_BY_DAMAGE) | |
+ { | |
+ char debug_info[255]; | |
+ sprintf(debug_info, "Ресет полученного урона"); | |
+ this->MonsterSay(debug_info, LANG_UNIVERSAL, 0); | |
+ | |
this->m_damageTakenForRemoveSpell = 0; | |
+ } | |
// ghost spell check, allow apply any auras at player loading in ghost mode (will be cleanup after load) | |
if (!isAlive() && !SpellMgr::IsDeathPersistentSpell(Aur->GetSpellProto()) && | |
(GetTypeId()!=TYPEID_PLAYER || !((Player*)this)->GetSession()->PlayerLoading())) | |
{ | |
delete Aur; | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment