Just merge commit 'origin/master' into 320

Conflicts:
	src/game/MiscHandler.cpp
This commit is contained in:
tomrus88 2009-07-28 17:05:38 +04:00
commit be8eaf4e46
33 changed files with 1089 additions and 863 deletions

View file

@ -321,6 +321,7 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
case 40810: case 43267: case 43268: // Saber Lash
case 42384: // Brutal Swipe
case 45150: // Meteor Slash
case 64422: case 64688: // Sonic Screech
{
uint32 count = 0;
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
@ -2462,7 +2463,7 @@ void Spell::EffectSendEvent(uint32 EffectIndex)
we do not handle a flag dropping or clicking on flag in battleground by sendevent system
*/
sLog.outDebug("Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->EffectMiscValue[EffectIndex], m_spellInfo->Id);
sWorld.ScriptsStart(sEventScripts, m_spellInfo->EffectMiscValue[EffectIndex], m_caster, focusObject);
m_caster->GetMap()->ScriptsStart(sEventScripts, m_spellInfo->EffectMiscValue[EffectIndex], m_caster, focusObject);
}
void Spell::EffectPowerBurn(uint32 i)
@ -2852,31 +2853,31 @@ void Spell::EffectEnergize(uint32 i)
Powers power = Powers(m_spellInfo->EffectMiscValue[i]);
// Some level depends spells
int multiplier = 0;
int level_multiplier = 0;
int level_diff = 0;
switch (m_spellInfo->Id)
{
// Restore Energy
case 9512:
case 9512: // Restore Energy
level_diff = m_caster->getLevel() - 40;
multiplier = 2;
level_multiplier = 2;
break;
// Blood Fury
case 24571:
case 24571: // Blood Fury
level_diff = m_caster->getLevel() - 60;
multiplier = 10;
level_multiplier = 10;
break;
// Burst of Energy
case 24532:
case 24532: // Burst of Energy
level_diff = m_caster->getLevel() - 60;
multiplier = 4;
level_multiplier = 4;
break;
case 31930: // Judgements of the Wise
case 63375: // Improved Stormstrike
damage = damage * unitTarget->GetCreateMana() / 100;
default:
break;
}
if (level_diff > 0)
damage -= multiplier * level_diff;
damage -= level_multiplier * level_diff;
if(damage < 0)
return;
@ -2965,7 +2966,7 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
case GAMEOBJECT_TYPE_DOOR:
case GAMEOBJECT_TYPE_BUTTON:
gameObjTarget->UseDoorOrButton();
sWorld.ScriptsStart(sGameObjectScripts, gameObjTarget->GetDBTableGUIDLow(), player, gameObjTarget);
player->GetMap()->ScriptsStart(sGameObjectScripts, gameObjTarget->GetDBTableGUIDLow(), player, gameObjTarget);
return;
case GAMEOBJECT_TYPE_QUESTGIVER:
@ -2985,7 +2986,7 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
if (gameObjTarget->GetGOInfo()->goober.eventId)
{
sLog.outDebug("Goober ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->goober.eventId,gameObjTarget->GetDBTableGUIDLow());
sWorld.ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->goober.eventId, player, gameObjTarget);
player->GetMap()->ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->goober.eventId, player, gameObjTarget);
}
// cast goober spell
@ -3014,7 +3015,7 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
if (gameObjTarget->GetGOInfo()->chest.eventId)
{
sLog.outDebug("Chest ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->chest.eventId,gameObjTarget->GetDBTableGUIDLow());
sWorld.ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->chest.eventId, player, gameObjTarget);
player->GetMap()->ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->chest.eventId, player, gameObjTarget);
}
// triggering linked GO
@ -5312,7 +5313,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
return;
sLog.outDebug("Spell ScriptStart spellid %u in EffectScriptEffect ", m_spellInfo->Id);
sWorld.ScriptsStart(sSpellScripts, m_spellInfo->Id, m_caster, unitTarget);
m_caster->GetMap()->ScriptsStart(sSpellScripts, m_spellInfo->Id, m_caster, unitTarget);
}
void Spell::EffectSanctuary(uint32 /*i*/)
@ -5496,7 +5497,7 @@ void Spell::EffectActivateObject(uint32 effect_idx)
int32 delay_secs = m_spellInfo->EffectMiscValue[effect_idx];
sWorld.ScriptCommandStart(activateCommand, delay_secs, m_caster, gameObjTarget);
gameObjTarget->GetMap()->ScriptCommandStart(activateCommand, delay_secs, m_caster, gameObjTarget);
}
void Spell::EffectApplyGlyph(uint32 i)