mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
apply cmangos changes
This commit is contained in:
12
MapMethods.h
12
MapMethods.h
@@ -259,19 +259,19 @@ namespace LuaMap
|
|||||||
uint32 weatherType = Eluna::CHECKVAL<uint32>(L, 3);
|
uint32 weatherType = Eluna::CHECKVAL<uint32>(L, 3);
|
||||||
float grade = Eluna::CHECKVAL<float>(L, 4);
|
float grade = Eluna::CHECKVAL<float>(L, 4);
|
||||||
|
|
||||||
#if ((defined(CMANGOS) || defined(MANGOS)) && defined(WOTLK))
|
#if defined(TRINITY)
|
||||||
if (Weather::IsValidWeatherType(weatherType))
|
|
||||||
map->SetWeather(zoneId, (WeatherType)weatherType, grade, false);
|
|
||||||
#else
|
|
||||||
#ifdef TRINITY
|
|
||||||
Weather* weather = WeatherMgr::FindWeather(zoneId);
|
Weather* weather = WeatherMgr::FindWeather(zoneId);
|
||||||
if (!weather)
|
if (!weather)
|
||||||
weather = WeatherMgr::AddWeather(zoneId);
|
weather = WeatherMgr::AddWeather(zoneId);
|
||||||
|
if (weather)
|
||||||
|
weather->SetWeather((WeatherType)weatherType, grade);
|
||||||
|
#elif defined(CMANGOS) || defined(WOTLK)
|
||||||
|
if (Weather::IsValidWeatherType(weatherType))
|
||||||
|
map->SetWeather(zoneId, (WeatherType)weatherType, grade, false);
|
||||||
#else
|
#else
|
||||||
Weather* weather = eWorld->FindWeather(zoneId);
|
Weather* weather = eWorld->FindWeather(zoneId);
|
||||||
if (!weather)
|
if (!weather)
|
||||||
weather = eWorld->AddWeather(zoneId);
|
weather = eWorld->AddWeather(zoneId);
|
||||||
#endif
|
|
||||||
if (weather)
|
if (weather)
|
||||||
weather->SetWeather((WeatherType)weatherType, grade);
|
weather->SetWeather((WeatherType)weatherType, grade);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1741,6 +1741,8 @@ namespace LuaUnit
|
|||||||
unit->DealDamage(target, damage, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, durabilityloss);
|
unit->DealDamage(target, damage, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, durabilityloss);
|
||||||
#ifdef TRINITY
|
#ifdef TRINITY
|
||||||
unit->SendAttackStateUpdate(HITINFO_AFFECTS_VICTIM, target, 1, SPELL_SCHOOL_MASK_NORMAL, damage, 0, 0, VICTIMSTATE_HIT, 0);
|
unit->SendAttackStateUpdate(HITINFO_AFFECTS_VICTIM, target, 1, SPELL_SCHOOL_MASK_NORMAL, damage, 0, 0, VICTIMSTATE_HIT, 0);
|
||||||
|
#elif defined(CMANGOS) && defined(WOTLK)
|
||||||
|
unit->SendAttackStateUpdate(HITINFO_NORMALSWING2, target, SPELL_SCHOOL_MASK_NORMAL, damage, 0, 0, VICTIMSTATE_NORMAL, 0);
|
||||||
#else
|
#else
|
||||||
unit->SendAttackStateUpdate(HITINFO_NORMALSWING2, target, 1, SPELL_SCHOOL_MASK_NORMAL, damage, 0, 0, VICTIMSTATE_NORMAL, 0);
|
unit->SendAttackStateUpdate(HITINFO_NORMALSWING2, target, 1, SPELL_SCHOOL_MASK_NORMAL, damage, 0, 0, VICTIMSTATE_NORMAL, 0);
|
||||||
#endif
|
#endif
|
||||||
@@ -1777,6 +1779,8 @@ namespace LuaUnit
|
|||||||
unit->DealDamage(target, damage, NULL, DIRECT_DAMAGE, schoolmask, NULL, false);
|
unit->DealDamage(target, damage, NULL, DIRECT_DAMAGE, schoolmask, NULL, false);
|
||||||
#ifdef TRINITY
|
#ifdef TRINITY
|
||||||
unit->SendAttackStateUpdate(HITINFO_AFFECTS_VICTIM, target, 1, schoolmask, damage, absorb, resist, VICTIMSTATE_HIT, 0);
|
unit->SendAttackStateUpdate(HITINFO_AFFECTS_VICTIM, target, 1, schoolmask, damage, absorb, resist, VICTIMSTATE_HIT, 0);
|
||||||
|
#elif defined(CMANGOS) && defined(WOTLK)
|
||||||
|
unit->SendAttackStateUpdate(HITINFO_NORMALSWING2, target, schoolmask, damage, absorb, resist, VICTIMSTATE_NORMAL, 0);
|
||||||
#else
|
#else
|
||||||
unit->SendAttackStateUpdate(HITINFO_NORMALSWING2, target, 1, schoolmask, damage, absorb, resist, VICTIMSTATE_NORMAL, 0);
|
unit->SendAttackStateUpdate(HITINFO_NORMALSWING2, target, 1, schoolmask, damage, absorb, resist, VICTIMSTATE_NORMAL, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user