--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-05 15:24:09 -06:00
7 changed files with 28 additions and 9 deletions
+8 -5
View File
@@ -113,12 +113,15 @@ void DynamicObject::Update(uint32 p_time)
else
deleteThis = true;
if(m_updateTimer < p_time)
if(m_effIndex < 4)
{
Trinity::DynamicObjectUpdater notifier(*this,caster);
VisitNearbyObject(GetRadius(), notifier);
m_updateTimer = 500; // is this official-like?
}else m_updateTimer -= p_time;
if(m_updateTimer < p_time)
{
Trinity::DynamicObjectUpdater notifier(*this,caster);
VisitNearbyObject(GetRadius(), notifier);
m_updateTimer = 500; // is this official-like?
}else m_updateTimer -= p_time;
}
if(deleteThis)
{
+1 -1
View File
@@ -3628,7 +3628,7 @@ void Spell::EffectAddFarsight(uint32 i)
float radius = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
int32 duration = GetSpellDuration(m_spellInfo);
DynamicObject* dynObj = new DynamicObject;
if(!dynObj->Create(objmgr.GenerateLowGuid(HIGHGUID_DYNAMICOBJECT), m_caster, m_spellInfo->Id, i, m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, duration, radius))
if(!dynObj->Create(objmgr.GenerateLowGuid(HIGHGUID_DYNAMICOBJECT), m_caster, m_spellInfo->Id, 4, m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, duration, radius))
{
delete dynObj;
return;
+1
View File
@@ -733,6 +733,7 @@ bool IsSingleTargetSpells(SpellEntry const *spellInfo1, SpellEntry const *spellI
switch(spec1)
{
case SPELL_JUDGEMENT:
case SPELL_MAGE_POLYMORPH:
if(GetSpellSpecific(spellInfo2->Id) == spec1)
return true;
break;
+1 -2
View File
@@ -554,11 +554,10 @@ void Transport::Update(uint32 /*p_time*/)
//MapManager::Instance().GetMap(m_curr->second.mapid)->Add((GameObject *)this); // -> // ->Add(t);
if ((sLog.getLogFilter() & LOG_FILTER_TRANSPORT_MOVES)==0)
sLog.outDetail("%s moved to %f %f %f %d", this->m_name.c_str(), m_curr->second.x, m_curr->second.y, m_curr->second.z, m_curr->second.mapid);
sLog.outDetail("%s moved to %d %f %f %f %d", this->m_name.c_str(), m_curr->second.id, m_curr->second.x, m_curr->second.y, m_curr->second.z, m_curr->second.mapid);
//Transport Event System
CheckForEvent(this->GetEntry(), m_curr->second.id);
sLog.outDetail("%s is at wp id: %u", this->m_name.c_str(), m_curr->second.id);
}
}
+1 -1
View File
@@ -10268,7 +10268,7 @@ int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_inde
}
}
if(spellProto->Attributes & SPELL_ATTR_LEVEL_DAMAGE_CALCULATION && spellProto->spellLevel &&
if(!basePointsPerLevel && (spellProto->Attributes & SPELL_ATTR_LEVEL_DAMAGE_CALCULATION && spellProto->spellLevel) &&
spellProto->Effect[effect_index] != SPELL_EFFECT_WEAPON_PERCENT_DAMAGE &&
spellProto->Effect[effect_index] != SPELL_EFFECT_KNOCK_BACK)
//there are many more: slow speed, -healing pct
+15
View File
@@ -2501,6 +2501,21 @@ void World::ScriptsProcess()
break;
}
case SCRIPT_COMMAND_KILL:
{
if(!source || ((Creature*)source)->isDead())
break;
((Creature*)source)->DealDamage(((Creature*)source), ((Creature*)source)->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
switch(step.script->dataint)
{
case 0: break; //return false not remove corpse
case 1: ((Creature*)source)->RemoveCorpse(); break;
}
break;
}
default:
sLog.outError("Unknown script command %u called.",step.script->command);
break;
+1
View File
@@ -345,6 +345,7 @@ enum RealmZone
#define SCRIPT_COMMAND_LOAD_PATH 16 // source = unit, path = datalong, repeatable datalong2
#define SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT 17 // datalong scriptid, lowguid datalong2, dataint table
#define SCRIPT_COMMAND_PLAYSOUND 18 // datalong soundid, datalong2 play only self
#define SCRIPT_COMMAND_KILL 19 // datalong removecorpse
/// Storage class for commands issued for delayed execution
struct CliCommandHolder