Eluna implement changes from new_mthread to master ~ Does not add multithread support
This commit is contained in:
@@ -14,9 +14,9 @@ namespace LuaWeather
|
||||
*
|
||||
* @return uint32 zoneId
|
||||
*/
|
||||
int GetZoneId(lua_State* L, Weather* weather)
|
||||
int GetZoneId(Eluna* E, Weather* weather)
|
||||
{
|
||||
Eluna::Push(L, weather->GetZone());
|
||||
Eluna::Push(E->L, weather->GetZone());
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -38,10 +38,10 @@ namespace LuaWeather
|
||||
* @param WeatherType type : the [WeatherType], see above available weather types
|
||||
* @param float grade : the intensity/grade of the [Weather], ranges from 0 to 1
|
||||
*/
|
||||
int SetWeather(lua_State* L, Weather* weather)
|
||||
int SetWeather(Eluna* E, Weather* weather)
|
||||
{
|
||||
uint32 weatherType = Eluna::CHECKVAL<uint32>(L, 2);
|
||||
float grade = Eluna::CHECKVAL<float>(L, 3);
|
||||
uint32 weatherType = Eluna::CHECKVAL<uint32>(E->L, 2);
|
||||
float grade = Eluna::CHECKVAL<float>(E->L, 3);
|
||||
|
||||
weather->SetWeather((WeatherType)weatherType, grade);
|
||||
return 0;
|
||||
@@ -52,9 +52,9 @@ namespace LuaWeather
|
||||
*
|
||||
* @param [Player] player
|
||||
*/
|
||||
int SendWeatherUpdateToPlayer(lua_State* L, Weather* weather)
|
||||
int SendWeatherUpdateToPlayer(Eluna* E, Weather* weather)
|
||||
{
|
||||
Player* player = Eluna::CHECKOBJ<Player>(L, 2);
|
||||
Player* player = Eluna::CHECKOBJ<Player>(E->L, 2);
|
||||
|
||||
weather->SendWeatherUpdateToPlayer(player);
|
||||
return 0;
|
||||
@@ -70,9 +70,9 @@ namespace LuaWeather
|
||||
*
|
||||
* @return bool changed : returns 'true' if [Weather] changed
|
||||
*/
|
||||
int Regenerate(lua_State* L, Weather* weather)
|
||||
int Regenerate(Eluna* E, Weather* weather)
|
||||
{
|
||||
Eluna::Push(L, weather->ReGenerate());
|
||||
Eluna::Push(E->L, weather->ReGenerate());
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -81,9 +81,9 @@ namespace LuaWeather
|
||||
*
|
||||
* @param bool changed : returns 'true' if weather changed for any [Player] in the zone, 'false' if no [Player] is within the zone
|
||||
*/
|
||||
int UpdateWeather(lua_State* L, Weather* weather)
|
||||
int UpdateWeather(Eluna* E, Weather* weather)
|
||||
{
|
||||
Eluna::Push(L, weather->UpdateWeather());
|
||||
Eluna::Push(E->L, weather->UpdateWeather());
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user