mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Remove DeleteBonesFromWorld method from corpse and fix build for TC
This commit is contained in:
@@ -77,19 +77,5 @@ namespace LuaCorpse
|
|||||||
corpse->SaveToDB();
|
corpse->SaveToDB();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Deletes the [Corpse] from the world.
|
|
||||||
*
|
|
||||||
* If the [Corpse]'s type is not BONES then this does nothing.
|
|
||||||
*/
|
|
||||||
int DeleteBonesFromWorld(Eluna* /*E*/, lua_State* /*L*/, Corpse* corpse)
|
|
||||||
{
|
|
||||||
// Prevent a failed assertion.
|
|
||||||
if (corpse->GetType() != CORPSE_BONES)
|
|
||||||
return 0;
|
|
||||||
corpse->DeleteBonesFromWorld();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -592,7 +592,10 @@ namespace LuaCreature
|
|||||||
uint32 spell = Eluna::CHECKVAL<uint32>(L, 2);
|
uint32 spell = Eluna::CHECKVAL<uint32>(L, 2);
|
||||||
|
|
||||||
#ifdef TRINITY
|
#ifdef TRINITY
|
||||||
Eluna::Push(L, creature->GetSpellHistory()->GetRemainingCooldown(spell));
|
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell))
|
||||||
|
Eluna::Push(L, creature->GetSpellHistory()->GetRemainingCooldown(spellInfo));
|
||||||
|
else
|
||||||
|
Eluna::Push(L, 0);
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, creature->GetCreatureSpellCooldownDelay(spell));
|
Eluna::Push(L, creature->GetCreatureSpellCooldownDelay(spell));
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -41,6 +41,20 @@ typedef QueryResult ElunaQuery;
|
|||||||
#define ELUNA_LOG_ERROR(...) TC_LOG_ERROR("eluna", __VA_ARGS__);
|
#define ELUNA_LOG_ERROR(...) TC_LOG_ERROR("eluna", __VA_ARGS__);
|
||||||
#define ELUNA_LOG_DEBUG(...) TC_LOG_DEBUG("eluna", __VA_ARGS__);
|
#define ELUNA_LOG_DEBUG(...) TC_LOG_DEBUG("eluna", __VA_ARGS__);
|
||||||
#define GET_GUID GetGUID
|
#define GET_GUID GetGUID
|
||||||
|
|
||||||
|
#define HIGHGUID_PLAYER HighGuid::Player
|
||||||
|
#define HIGHGUID_UNIT HighGuid::Unit
|
||||||
|
#define HIGHGUID_ITEM HighGuid::Item
|
||||||
|
#define HIGHGUID_GAMEOBJECT HighGuid::GameObject
|
||||||
|
#define HIGHGUID_PET HighGuid::Pet
|
||||||
|
#define HIGHGUID_TRANSPORT HighGuid::Transport
|
||||||
|
#define HIGHGUID_VEHICLE HighGuid::Vehicle
|
||||||
|
#define HIGHGUID_CONTAINER HighGuid::Container
|
||||||
|
#define HIGHGUID_DYNAMICOBJECT HighGuid::DynamicObject
|
||||||
|
#define HIGHGUID_CORPSE HighGuid::Corpse
|
||||||
|
#define HIGHGUID_MO_TRANSPORT HighGuid::Mo_Transport
|
||||||
|
#define HIGHGUID_INSTANCE HighGuid::Instance
|
||||||
|
#define HIGHGUID_GROUP HighGuid::Group
|
||||||
#else
|
#else
|
||||||
typedef QueryNamedResult ElunaQuery;
|
typedef QueryNamedResult ElunaQuery;
|
||||||
#define ASSERT MANGOS_ASSERT
|
#define ASSERT MANGOS_ASSERT
|
||||||
|
|||||||
@@ -1226,7 +1226,6 @@ ElunaRegister<Corpse> CorpseMethods[] =
|
|||||||
// Other
|
// Other
|
||||||
{ "ResetGhostTime", &LuaCorpse::ResetGhostTime },
|
{ "ResetGhostTime", &LuaCorpse::ResetGhostTime },
|
||||||
{ "SaveToDB", &LuaCorpse::SaveToDB },
|
{ "SaveToDB", &LuaCorpse::SaveToDB },
|
||||||
{ "DeleteBonesFromWorld", &LuaCorpse::DeleteBonesFromWorld },
|
|
||||||
|
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -817,7 +817,10 @@ namespace LuaPlayer
|
|||||||
uint32 spellId = Eluna::CHECKVAL<uint32>(L, 2);
|
uint32 spellId = Eluna::CHECKVAL<uint32>(L, 2);
|
||||||
|
|
||||||
#ifdef TRINITY
|
#ifdef TRINITY
|
||||||
Eluna::Push(L, player->GetSpellHistory()->GetRemainingCooldown(spellId));
|
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId))
|
||||||
|
Eluna::Push(L, player->GetSpellHistory()->GetRemainingCooldown(spellInfo));
|
||||||
|
else
|
||||||
|
Eluna::Push(L, 0);
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, uint32(player->GetSpellCooldownDelay(spellId)));
|
Eluna::Push(L, uint32(player->GetSpellCooldownDelay(spellId)));
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user