Changeset 72
- Timestamp:
- 11/19/08 13:31:37 (17 years ago)
- Location:
- trunk/src/game
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Level1.cpp
r44 r72 1242 1242 1243 1243 float Scale = (float)atof((char*)args); 1244 if (Scale > 3.0f || Scale <= 0.0f)1244 if (Scale > 10.0f || Scale <= 0.0f) 1245 1245 { 1246 1246 SendSysMessage(LANG_BAD_VALUE); -
trunk/src/game/ThreatManager.cpp
r44 r72 268 268 HostilReference* currentRef = NULL; 269 269 bool found = false; 270 271 std::list<HostilReference*>::iterator lastRef = iThreatList.end(); 272 lastRef--; 273 270 274 for(std::list<HostilReference*>::iterator iter = iThreatList.begin(); iter != iThreatList.end() && !found; ++iter) 271 275 { … … 274 278 Unit* target = currentRef->getTarget(); 275 279 assert(target); // if the ref has status online the target must be there ! 280 281 // some units are prefered in comparison to others 282 if(iter != lastRef && (target->IsImmunedToDamage(pAttacker->GetMeleeDamageSchoolMask(), false) || 283 target->hasUnitState(UNIT_STAT_CONFUSED | UNIT_STAT_FLEEING) 284 ) ) 285 { 286 // current victim is a second choice target, so don't compare threat with it below 287 if(currentRef == pCurrentVictim) 288 pCurrentVictim = NULL; 289 continue; 290 } 276 291 277 292 if(!pAttacker->IsOutOfThreatArea(target)) // skip non attackable currently targets -
trunk/src/game/Totem.cpp
r44 r72 162 162 m_type = TOTEM_STATUE; //Jewelery statue 163 163 } 164 165 bool Totem::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges) 166 { 167 for (int i=0;i<3;i++) 168 { 169 switch(spellInfo->EffectApplyAuraName[i]) 170 { 171 case SPELL_AURA_PERIODIC_DAMAGE: 172 case SPELL_AURA_PERIODIC_LEECH: 173 return true; 174 default: 175 continue; 176 } 177 } 178 return Creature::IsImmunedToSpell(spellInfo, useCharges); 179 } -
trunk/src/game/Totem.h
r44 r72 55 55 void UpdateAttackPowerAndDamage(bool /*ranged*/ ) {} 56 56 void UpdateDamagePhysical(WeaponAttackType /*attType*/) {} 57 58 bool IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges = false); 57 59 58 60 protected: