*Merge tc1 commits 1582-1590

--HG--
branch : trunk
This commit is contained in:
QAston
2009-06-27 15:29:06 +02:00
7 changed files with 34 additions and 27 deletions
+3
View File
@@ -0,0 +1,3 @@
# 1589
-- Spiritual Attunement
UPDATE `spell_proc_event` SET `procFlags` = `procFlags`|0x80000 WHERE `entry` IN ('31785','33776');
@@ -77,7 +77,6 @@ struct TRINITY_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI
Enraged = false; Enraged = false;
Counter = 0; Counter = 0;
summons.DespawnAll(); summons.DespawnAll();
} }
void EnterCombat(Unit *who) void EnterCombat(Unit *who)
+1 -2
View File
@@ -734,7 +734,7 @@ class TRINITY_DLL_SPEC Creature : public Unit
} }
void ResetPlayerDamageReq() { m_PlayerDamageReq = GetHealth() / 2; } void ResetPlayerDamageReq() { m_PlayerDamageReq = GetHealth() / 2; }
uint32 m_PlayerDamageReq; uint32 m_PlayerDamageReq;
void SetOriginalEntry(uint32 entry) { m_originalEntry = entry; } void SetOriginalEntry(uint32 entry) { m_originalEntry = entry; }
static float _GetDamageMod(int32 Rank); static float _GetDamageMod(int32 Rank);
@@ -751,7 +751,6 @@ class TRINITY_DLL_SPEC Creature : public Unit
uint32 m_lootMoney; uint32 m_lootMoney;
uint64 m_lootRecipient; uint64 m_lootRecipient;
uint32 m_unDamageByPlayers;
/// Timers /// Timers
uint32 m_deathTimer; // (msecs)timer for death or corpse disappearance uint32 m_deathTimer; // (msecs)timer for death or corpse disappearance
+10 -3
View File
@@ -66,6 +66,12 @@ bool ChatHandler::HandleMuteCommand(const char* args)
return false; return false;
uint32 account_id = target ? target->GetSession()->GetAccountId() : objmgr.GetPlayerAccountIdByGUID(target_guid); 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 // find only player from same account if any
if(!target) 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 ); LoginDatabase.PExecute("UPDATE account SET mutetime = " UI64FMTD " WHERE id = '%u'",uint64(mutetime), account_id );
if(target) 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); 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; return true;
} }
+6 -9
View File
@@ -19614,17 +19614,14 @@ void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewar
bool Player::IsAtGroupRewardDistance(WorldObject const* pRewardSource) const bool Player::IsAtGroupRewardDistance(WorldObject const* pRewardSource) const
{ {
if (pRewardSource->IsWithinDistInMap(this,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE))) const WorldObject* player = GetCorpse();
return true; if(!player || isAlive())
player = this;
if (isAlive())
if(player->GetMapId() != pRewardSource->GetMapId() || player->GetInstanceId() != pRewardSource->GetInstanceId())
return false; return false;
Corpse* corpse = GetCorpse(); return pRewardSource->GetDistance(player) <= sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE);
if (!corpse)
return false;
return pRewardSource->IsWithinDistInMap(corpse,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE));
} }
uint32 Player::GetBaseWeaponSkillValue (WeaponAttackType attType) const uint32 Player::GetBaseWeaponSkillValue (WeaponAttackType attType) const
+11 -11
View File
@@ -5991,23 +5991,23 @@ void Spell::EffectMomentMove(uint32 i)
dist = sqrt((x-destx)*(x-destx) + (y-desty)*(y-desty)); dist = sqrt((x-destx)*(x-destx) + (y-desty)*(y-desty));
step = dist/10.0f; step = dist/10.0f;
} }
int j = 0; int j = 0;
for(j; j<10 ;j++) for(j; j<10 ;j++)
{ {
if(fabs(z - destz) > 6) if(fabs(z - destz) > 6)
{ {
destx -= step * cos(orientation); destx -= step * cos(orientation);
desty -= step * sin(orientation); desty -= step * sin(orientation);
ground = unitTarget->GetMap()->GetHeight(destx,desty,MAX_HEIGHT,true); ground = unitTarget->GetMap()->GetHeight(destx,desty,MAX_HEIGHT,true);
floor = unitTarget->GetMap()->GetHeight(destx,desty,z, true); floor = unitTarget->GetMap()->GetHeight(destx,desty,z, true);
destz = fabs(ground - z) <= fabs(floor - z) ? ground:floor; destz = fabs(ground - z) <= fabs(floor - z) ? ground:floor;
}else }else
break; break;
} }
if(j == 9) if(j == 9)
{ {
return; return;
} }
unitTarget->NearTeleportTo(destx, desty, destz + 0.07531, orientation, unitTarget==m_caster); unitTarget->NearTeleportTo(destx, desty, destz + 0.07531, orientation, unitTarget==m_caster);
+3 -1
View File
@@ -6306,7 +6306,9 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
// heal amount // heal amount
basepoints0 = triggerAmount*damage/100; basepoints0 = triggerAmount*damage/100;
target = this; target = this;
triggered_spell_id = 31786;
if(basepoints0)
triggered_spell_id = 31786;
break; break;
} }
// Seal of Blood do damage trigger // Seal of Blood do damage trigger