mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[7362] Use IN_MILISECONDS where appropriate, other cleanups.
This commit is contained in:
parent
cea44af521
commit
2b9eeb782e
22 changed files with 120 additions and 111 deletions
|
|
@ -590,7 +590,7 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
|
|||
// Add main hand dps * effect[2] amount
|
||||
float averange = (m_caster->GetFloatValue(UNIT_FIELD_MINDAMAGE) + m_caster->GetFloatValue(UNIT_FIELD_MAXDAMAGE)) / 2;
|
||||
int32 count = m_caster->CalculateSpellDamage(m_spellInfo, 2, m_spellInfo->EffectBasePoints[2], unitTarget);
|
||||
damage += count * int32(averange * 1000) / m_caster->GetAttackTime(BASE_ATTACK);
|
||||
damage += count * int32(averange * IN_MILISECONDS) / m_caster->GetAttackTime(BASE_ATTACK);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -3413,7 +3413,7 @@ void Spell::EffectDispel(uint32 i)
|
|||
|
||||
// On succes dispel
|
||||
// Devour Magic
|
||||
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->Category == 12)
|
||||
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->Category == SPELLCATEGORY_DEVOUR_MAGIC)
|
||||
{
|
||||
uint32 heal_spell = 0;
|
||||
switch (m_spellInfo->Id)
|
||||
|
|
@ -3484,7 +3484,7 @@ void Spell::EffectDistract(uint32 /*i*/)
|
|||
// Set creature Distracted, Stop it, And turn it
|
||||
unitTarget->SetOrientation(angle);
|
||||
unitTarget->StopMoving();
|
||||
unitTarget->GetMotionMaster()->MoveDistract(damage*1000);
|
||||
unitTarget->GetMotionMaster()->MoveDistract(damage*IN_MILISECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4575,7 +4575,7 @@ void Spell::EffectSummonObjectWild(uint32 i)
|
|||
}
|
||||
|
||||
int32 duration = GetSpellDuration(m_spellInfo);
|
||||
pGameObj->SetRespawnTime(duration > 0 ? duration/1000 : 0);
|
||||
pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILISECONDS : 0);
|
||||
pGameObj->SetSpellId(m_spellInfo->Id);
|
||||
|
||||
if(pGameObj->GetGoType() != GAMEOBJECT_TYPE_FLAGDROP) // make dropped flag clickable for other players (not set owner guid (created by) for this)...
|
||||
|
|
@ -4618,7 +4618,7 @@ void Spell::EffectSummonObjectWild(uint32 i)
|
|||
if(linkedGO->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), linkedEntry, map,
|
||||
m_caster->GetPhaseMask(), x, y, z, target->GetOrientation(), 0, 0, 0, 0, 100, 1))
|
||||
{
|
||||
linkedGO->SetRespawnTime(duration > 0 ? duration/1000 : 0);
|
||||
linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILISECONDS : 0);
|
||||
linkedGO->SetSpellId(m_spellInfo->Id);
|
||||
|
||||
m_caster->AddGameObject(linkedGO);
|
||||
|
|
@ -5243,7 +5243,7 @@ void Spell::EffectDuel(uint32 i)
|
|||
pGameObj->SetUInt32Value(GAMEOBJECT_FACTION, m_caster->getFaction() );
|
||||
pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel()+1 );
|
||||
int32 duration = GetSpellDuration(m_spellInfo);
|
||||
pGameObj->SetRespawnTime(duration > 0 ? duration/1000 : 0);
|
||||
pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILISECONDS : 0);
|
||||
pGameObj->SetSpellId(m_spellInfo->Id);
|
||||
|
||||
m_caster->AddGameObject(pGameObj);
|
||||
|
|
@ -5320,7 +5320,7 @@ void Spell::EffectSummonPlayer(uint32 /*i*/)
|
|||
WorldPacket data(SMSG_SUMMON_REQUEST, 8+4+4);
|
||||
data << uint64(m_caster->GetGUID()); // summoner guid
|
||||
data << uint32(m_caster->GetZoneId()); // summoner zone
|
||||
data << uint32(MAX_PLAYER_SUMMON_DELAY*1000); // auto decline after msecs
|
||||
data << uint32(MAX_PLAYER_SUMMON_DELAY*IN_MILISECONDS); // auto decline after msecs
|
||||
((Player*)unitTarget)->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
|
|
@ -5503,7 +5503,7 @@ void Spell::EffectEnchantHeldItem(uint32 i)
|
|||
return;
|
||||
|
||||
// Apply the temporary enchantment
|
||||
item->SetEnchantment(slot, enchant_id, duration*1000, 0);
|
||||
item->SetEnchantment(slot, enchant_id, duration*IN_MILISECONDS, 0);
|
||||
item_owner->ApplyEnchantment(item,slot,true);
|
||||
}
|
||||
}
|
||||
|
|
@ -5634,7 +5634,7 @@ void Spell::EffectSummonObject(uint32 i)
|
|||
|
||||
pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL,m_caster->getLevel());
|
||||
int32 duration = GetSpellDuration(m_spellInfo);
|
||||
pGameObj->SetRespawnTime(duration > 0 ? duration/1000 : 0);
|
||||
pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILISECONDS : 0);
|
||||
pGameObj->SetSpellId(m_spellInfo->Id);
|
||||
m_caster->AddGameObject(pGameObj);
|
||||
|
||||
|
|
@ -6250,7 +6250,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
|
|||
case 3: lastSec = 17; break;
|
||||
}
|
||||
|
||||
duration = duration - lastSec*1000 + FISHING_BOBBER_READY_TIME*1000;
|
||||
duration = duration - lastSec*IN_MILISECONDS + FISHING_BOBBER_READY_TIME*IN_MILISECONDS;
|
||||
break;
|
||||
}
|
||||
case GAMEOBJECT_TYPE_SUMMONING_RITUAL:
|
||||
|
|
@ -6270,7 +6270,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
|
|||
}
|
||||
}
|
||||
|
||||
pGameObj->SetRespawnTime(duration > 0 ? duration/1000 : 0);
|
||||
pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILISECONDS : 0);
|
||||
|
||||
pGameObj->SetOwnerGUID(m_caster->GetGUID() );
|
||||
|
||||
|
|
@ -6293,7 +6293,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
|
|||
if(linkedGO->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), linkedEntry, cMap,
|
||||
m_caster->GetPhaseMask(), fx, fy, fz, m_caster->GetOrientation(), 0, 0, 0, 0, 100, 1))
|
||||
{
|
||||
linkedGO->SetRespawnTime(duration > 0 ? duration/1000 : 0);
|
||||
linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILISECONDS : 0);
|
||||
linkedGO->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel() );
|
||||
linkedGO->SetSpellId(m_spellInfo->Id);
|
||||
linkedGO->SetOwnerGUID(m_caster->GetGUID() );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue