diff options
-rw-r--r-- | sql/updates/1589_world.sql | 3 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp | 1 | ||||
-rw-r--r-- | src/game/Creature.h | 3 | ||||
-rw-r--r-- | src/game/Level2.cpp | 13 | ||||
-rw-r--r-- | src/game/Player.cpp | 15 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 22 | ||||
-rw-r--r-- | src/game/Unit.cpp | 4 |
7 files changed, 34 insertions, 27 deletions
diff --git a/sql/updates/1589_world.sql b/sql/updates/1589_world.sql new file mode 100644 index 00000000000..e3a76bedf7d --- /dev/null +++ b/sql/updates/1589_world.sql @@ -0,0 +1,3 @@ +# 1589 +-- Spiritual Attunement +UPDATE `spell_proc_event` SET `procFlags` = `procFlags`|0x80000 WHERE `entry` IN ('31785','33776'); diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index 5b9d74d72c8..a6b0338411e 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -77,7 +77,6 @@ struct TRINITY_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI Enraged = false; Counter = 0; - summons.DespawnAll(); } void EnterCombat(Unit *who) diff --git a/src/game/Creature.h b/src/game/Creature.h index f29982436d5..d0bd7c7261f 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -734,7 +734,7 @@ class TRINITY_DLL_SPEC Creature : public Unit } void ResetPlayerDamageReq() { m_PlayerDamageReq = GetHealth() / 2; } uint32 m_PlayerDamageReq; - + void SetOriginalEntry(uint32 entry) { m_originalEntry = entry; } static float _GetDamageMod(int32 Rank); @@ -751,7 +751,6 @@ class TRINITY_DLL_SPEC Creature : public Unit uint32 m_lootMoney; uint64 m_lootRecipient; - uint32 m_unDamageByPlayers; /// Timers uint32 m_deathTimer; // (msecs)timer for death or corpse disappearance diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp index 63d8943469d..3d74a1d0f76 100644 --- a/src/game/Level2.cpp +++ b/src/game/Level2.cpp @@ -66,6 +66,12 @@ bool ChatHandler::HandleMuteCommand(const char* args) return false; uint32 account_id = target ? target->GetSession()->GetAccountId() : objmgr.GetPlayerAccountIdByGUID(target_guid); + std::string mutereasonstr; + if(!mutereason) + mutereasonstr = "No reason."; + else + mutereasonstr = mutereason; + // find only player from same account if any if(!target) @@ -88,11 +94,12 @@ bool ChatHandler::HandleMuteCommand(const char* args) LoginDatabase.PExecute("UPDATE account SET mutetime = " UI64FMTD " WHERE id = '%u'",uint64(mutetime), account_id ); if(target) - ChatHandler(target).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notspeaktime); - + ChatHandler(target).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notspeaktime, mutereasonstr.c_str()); + std::string nameLink = playerLink(target_name); - PSendSysMessage(LANG_YOU_DISABLE_CHAT, nameLink.c_str(), notspeaktime); + PSendSysMessage(LANG_YOU_DISABLE_CHAT, nameLink, notspeaktime, mutereasonstr.c_str()); + return true; } diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 29f4dbde84d..5ebf498b072 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -19614,17 +19614,14 @@ void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewar bool Player::IsAtGroupRewardDistance(WorldObject const* pRewardSource) const { - if (pRewardSource->IsWithinDistInMap(this,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE))) - return true; - - if (isAlive()) - return false; - - Corpse* corpse = GetCorpse(); - if (!corpse) + const WorldObject* player = GetCorpse(); + if(!player || isAlive()) + player = this; + + if(player->GetMapId() != pRewardSource->GetMapId() || player->GetInstanceId() != pRewardSource->GetInstanceId()) return false; - return pRewardSource->IsWithinDistInMap(corpse,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE)); + return pRewardSource->GetDistance(player) <= sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE); } uint32 Player::GetBaseWeaponSkillValue (WeaponAttackType attType) const diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 1de51e112fb..d5ee8a0b731 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -5991,23 +5991,23 @@ void Spell::EffectMomentMove(uint32 i) dist = sqrt((x-destx)*(x-destx) + (y-desty)*(y-desty)); step = dist/10.0f; } - + int j = 0; for(j; j<10 ;j++) { - if(fabs(z - destz) > 6) - { - destx -= step * cos(orientation); - desty -= step * sin(orientation); - ground = unitTarget->GetMap()->GetHeight(destx,desty,MAX_HEIGHT,true); - floor = unitTarget->GetMap()->GetHeight(destx,desty,z, true); - destz = fabs(ground - z) <= fabs(floor - z) ? ground:floor; - }else - break; + if(fabs(z - destz) > 6) + { + destx -= step * cos(orientation); + desty -= step * sin(orientation); + ground = unitTarget->GetMap()->GetHeight(destx,desty,MAX_HEIGHT,true); + floor = unitTarget->GetMap()->GetHeight(destx,desty,z, true); + destz = fabs(ground - z) <= fabs(floor - z) ? ground:floor; + }else + break; } if(j == 9) { - return; + return; } unitTarget->NearTeleportTo(destx, desty, destz + 0.07531, orientation, unitTarget==m_caster); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 94f7f9f8d59..7ff15e5a6a3 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6306,7 +6306,9 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger // heal amount basepoints0 = triggerAmount*damage/100; target = this; - triggered_spell_id = 31786; + + if(basepoints0) + triggered_spell_id = 31786; break; } // Seal of Blood do damage trigger |