Skip to content

Commit

Permalink
Merge branch 'events-namespace' of https://github.com/ramon-bernardo/…
Browse files Browse the repository at this point in the history
…forgottenserver into events-namespace
  • Loading branch information
ramon-bernardo committed Jul 6, 2024
2 parents fc8d0c6 + 197d007 commit 6d7a18c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/luascript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5037,10 +5037,10 @@ int LuaScriptInterface::luaGameCreateMonster(lua_State* L)
return 1;
}

const Position& position = tfs::lua::getPosition(L, 2);
bool extended = tfs::lua::getBoolean(L, 3, false);
bool force = tfs::lua::getBoolean(L, 4, false);
MagicEffectClasses magicEffect = tfs::lua::getNumber<MagicEffectClasses>(L, 5, CONST_ME_TELEPORT);
const Position& position = getPosition(L, 2);

Check failure on line 5040 in src/luascript.cpp

View workflow job for this annotation

GitHub Actions / test

‘getPosition’ was not declared in this scope; did you mean ‘tfs::lua::getPosition’?
bool extended = getBoolean(L, 3, false);

Check failure on line 5041 in src/luascript.cpp

View workflow job for this annotation

GitHub Actions / test

‘getBoolean’ was not declared in this scope
bool force = getBoolean(L, 4, false);
MagicEffectClasses magicEffect = getNumber<MagicEffectClasses>(L, 5, CONST_ME_TELEPORT);

Check failure on line 5043 in src/luascript.cpp

View workflow job for this annotation

GitHub Actions / test

‘getNumber’ was not declared in this scope
if (tfs::events::monster::onSpawn(monster, position, false, true) || force) {
if (g_game.placeCreature(monster, position, extended, force, magicEffect)) {
tfs::lua::pushUserdata(L, monster);
Expand Down Expand Up @@ -8688,7 +8688,7 @@ int LuaScriptInterface::luaCreatureSay(lua_State* L)
}

// Prevent infinity echo on event onHear
bool echo = tfs::lua::getScriptEnv()->getScriptId() == tfs::events::getScriptId(EventInfoId::CREATURE_ONHEAR);
bool echo = getScriptEnv()->getScriptId() == tfs::events::getScriptId(EventInfoId::CREATURE_ONHEAR);

Check failure on line 8691 in src/luascript.cpp

View workflow job for this annotation

GitHub Actions / test

‘getScriptEnv’ was not declared in this scope; did you mean ‘tfs::lua::getScriptEnv’?

if (position.x != 0) {
tfs::lua::pushBoolean(L, g_game.internalCreatureSay(creature, type, text, ghost, &spectators, &position, echo));
Expand Down Expand Up @@ -11350,7 +11350,7 @@ int LuaScriptInterface::luaMonsterGetId(lua_State* L)
Monster* monster = tfs::lua::getUserdata<Monster>(L, 1);
if (monster) {
// Set monster id if it's not set yet (only for onSpawn event)
if (tfs::lua::getScriptEnv()->getScriptId() == tfs::events::getScriptId(EventInfoId::MONSTER_ONSPAWN)) {
if (getScriptEnv()->getScriptId() == tfs::events::getScriptId(EventInfoId::MONSTER_ONSPAWN)) {

Check failure on line 11353 in src/luascript.cpp

View workflow job for this annotation

GitHub Actions / test

‘getScriptEnv’ was not declared in this scope; did you mean ‘tfs::lua::getScriptEnv’?
monster->setID();
}

Expand Down

0 comments on commit 6d7a18c

Please sign in to comment.