mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Fix clang warnings about variable usage
This commit is contained in:
@@ -289,7 +289,7 @@ namespace LuaGameObject
|
|||||||
*
|
*
|
||||||
* The gameobject may be automatically respawned by the core
|
* The gameobject may be automatically respawned by the core
|
||||||
*/
|
*/
|
||||||
int Despawn(lua_State* L, GameObject* go)
|
int Despawn(lua_State* /*L*/, GameObject* go)
|
||||||
{
|
{
|
||||||
go->SetLootState(GO_JUST_DEACTIVATED);
|
go->SetLootState(GO_JUST_DEACTIVATED);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -298,7 +298,7 @@ namespace LuaGameObject
|
|||||||
/**
|
/**
|
||||||
* Respawns a [GameObject]
|
* Respawns a [GameObject]
|
||||||
*/
|
*/
|
||||||
int Respawn(lua_State* L, GameObject* go)
|
int Respawn(lua_State* /*L*/, GameObject* go)
|
||||||
{
|
{
|
||||||
go->Respawn();
|
go->Respawn();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -639,7 +639,6 @@ ElunaRegister<Player> PlayerMethods[] =
|
|||||||
{ "GossipClearMenu", &LuaPlayer::GossipClearMenu },
|
{ "GossipClearMenu", &LuaPlayer::GossipClearMenu },
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
{ "SendClearCooldowns", &LuaPlayer::SendClearCooldowns },
|
|
||||||
{ "SendBroadcastMessage", &LuaPlayer::SendBroadcastMessage },
|
{ "SendBroadcastMessage", &LuaPlayer::SendBroadcastMessage },
|
||||||
{ "SendAreaTriggerMessage", &LuaPlayer::SendAreaTriggerMessage },
|
{ "SendAreaTriggerMessage", &LuaPlayer::SendAreaTriggerMessage },
|
||||||
{ "SendNotification", &LuaPlayer::SendNotification },
|
{ "SendNotification", &LuaPlayer::SendNotification },
|
||||||
|
|||||||
@@ -305,7 +305,7 @@ namespace LuaMap
|
|||||||
/**
|
/**
|
||||||
* Saves the [Map]'s instance data to the database.
|
* Saves the [Map]'s instance data to the database.
|
||||||
*/
|
*/
|
||||||
int SaveInstanceData(lua_State* L, Map* map)
|
int SaveInstanceData(lua_State* /*L*/, Map* map)
|
||||||
{
|
{
|
||||||
#ifdef TRINITY
|
#ifdef TRINITY
|
||||||
ElunaInstanceAI* iAI = NULL;
|
ElunaInstanceAI* iAI = NULL;
|
||||||
|
|||||||
@@ -3432,25 +3432,6 @@ namespace LuaPlayer
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Clears a cooldown of the specified spell
|
|
||||||
*
|
|
||||||
* @param uint32 spellId : entry of a spell
|
|
||||||
* @param [Unit] target
|
|
||||||
*/
|
|
||||||
int SendClearCooldowns(lua_State* L, Player* player)
|
|
||||||
{
|
|
||||||
uint32 spellId = Eluna::CHECKVAL<uint32>(L, 2);
|
|
||||||
Unit* target = Eluna::CHECKOBJ<Unit>(L, 3);
|
|
||||||
|
|
||||||
#ifdef TRINITY
|
|
||||||
target->GetSpellHistory()->ResetCooldown(spellId, true);
|
|
||||||
#else
|
|
||||||
player->SendClearCooldown(spellId, target);
|
|
||||||
#endif
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a Broadcast Message to the [Player]
|
* Sends a Broadcast Message to the [Player]
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ bool Eluna::OnAreaTrigger(Player* pPlayer, AreaTriggerEntry const* pTrigger)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Weather
|
// Weather
|
||||||
void Eluna::OnChange(Weather* weather, uint32 zone, WeatherState state, float grade)
|
void Eluna::OnChange(Weather* /*weather*/, uint32 zone, WeatherState state, float grade)
|
||||||
{
|
{
|
||||||
START_HOOK(WEATHER_EVENT_ON_CHANGE);
|
START_HOOK(WEATHER_EVENT_ON_CHANGE);
|
||||||
Push(zone);
|
Push(zone);
|
||||||
|
|||||||
@@ -2285,7 +2285,7 @@ namespace LuaUnit
|
|||||||
*/
|
*/
|
||||||
int CastSpell(lua_State* L, Unit* unit)
|
int CastSpell(lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
Unit* target = Eluna::CHECKOBJ<Unit>(L, 2, NULL);
|
Unit* target = Eluna::CHECKOBJ<Unit>(L, 2, false);
|
||||||
uint32 spell = Eluna::CHECKVAL<uint32>(L, 3);
|
uint32 spell = Eluna::CHECKVAL<uint32>(L, 3);
|
||||||
bool triggered = Eluna::CHECKVAL<bool>(L, 4, false);
|
bool triggered = Eluna::CHECKVAL<bool>(L, 4, false);
|
||||||
#ifdef CMANGOS
|
#ifdef CMANGOS
|
||||||
@@ -2319,7 +2319,7 @@ namespace LuaUnit
|
|||||||
*/
|
*/
|
||||||
int CastCustomSpell(lua_State* L, Unit* unit)
|
int CastCustomSpell(lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
Unit* target = Eluna::CHECKOBJ<Unit>(L, 2, NULL);
|
Unit* target = Eluna::CHECKOBJ<Unit>(L, 2, false);
|
||||||
uint32 spell = Eluna::CHECKVAL<uint32>(L, 3);
|
uint32 spell = Eluna::CHECKVAL<uint32>(L, 3);
|
||||||
bool triggered = Eluna::CHECKVAL<bool>(L, 4, false);
|
bool triggered = Eluna::CHECKVAL<bool>(L, 4, false);
|
||||||
bool has_bp0 = !lua_isnoneornil(L, 5);
|
bool has_bp0 = !lua_isnoneornil(L, 5);
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ namespace LuaWorldObject
|
|||||||
|
|
||||||
float x, y, z;
|
float x, y, z;
|
||||||
obj->GetPosition(x, y, z);
|
obj->GetPosition(x, y, z);
|
||||||
ElunaUtil::WorldObjectInRangeCheck checker(true, obj, range, type, entry, hostile);
|
ElunaUtil::WorldObjectInRangeCheck checker(true, obj, range, type, entry, hostile, dead);
|
||||||
|
|
||||||
WorldObject* target = NULL;
|
WorldObject* target = NULL;
|
||||||
#ifndef TRINITY
|
#ifndef TRINITY
|
||||||
|
|||||||
Reference in New Issue
Block a user