mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Remove Weather functions and type, add Map:SetWeather
Weather hook changes
This commit is contained in:
@@ -2051,76 +2051,6 @@ namespace LuaGlobalFunctions
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the [Weather] for a zone.
|
||||
*
|
||||
* @param uint32 zoneId : zone Id to check for [Weather]
|
||||
* @return [Weather] weather
|
||||
*/
|
||||
int FindWeather(Eluna* /*E*/, lua_State* L)
|
||||
{
|
||||
uint32 zoneId = Eluna::CHECKVAL<uint32>(L, 1);
|
||||
#ifndef TRINITY
|
||||
Weather* weather = eWorld->FindWeather(zoneId);
|
||||
#else
|
||||
Weather* weather = WeatherMgr::FindWeather(zoneId);
|
||||
#endif
|
||||
Eluna::Push(L, weather);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds weather to a zone and returns the new [Weather] object.
|
||||
*
|
||||
* @param uint32 zoneId : zone Id to add [Weather]
|
||||
* @return [Weather] weather
|
||||
*/
|
||||
int AddWeather(Eluna* /*E*/, lua_State* L)
|
||||
{
|
||||
uint32 zoneId = Eluna::CHECKVAL<uint32>(L, 1);
|
||||
#ifndef TRINITY
|
||||
Weather* weather = eWorld->AddWeather(zoneId);
|
||||
#else
|
||||
Weather* weather = WeatherMgr::AddWeather(zoneId);
|
||||
#endif
|
||||
Eluna::Push(L, weather);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes [Weather] from a zone.
|
||||
*
|
||||
* @param uint32 zoneId : zone Id to remove [Weather]
|
||||
*/
|
||||
int RemoveWeather(Eluna* /*E*/, lua_State* L)
|
||||
{
|
||||
uint32 zoneId = Eluna::CHECKVAL<uint32>(L, 1);
|
||||
#ifndef TRINITY
|
||||
eWorld->RemoveWeather(zoneId);
|
||||
#else
|
||||
WeatherMgr::RemoveWeather(zoneId);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a clear weather packet to a [Player].
|
||||
*
|
||||
* Does not affect other [Player]s in the same zone, or affect the zone.
|
||||
*
|
||||
* @param [Player] player : [Player] to send the normal weather to
|
||||
*/
|
||||
int SendFineWeatherToPlayer(Eluna* /*E*/, lua_State* L)
|
||||
{
|
||||
Player* player = Eluna::CHECKOBJ<Player>(L, 1);
|
||||
#ifndef TRINITY
|
||||
Weather::SendFineWeatherUpdateToPlayer(player);
|
||||
#else
|
||||
WeatherMgr::SendFineWeatherUpdateToPlayer(player);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns `true` if the bag and slot is a valid inventory position, otherwise `false`.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user