@@ -306,7 +306,7 @@ void Events::eventCreatureOnHear(Creature* creature, Creature* speaker, const st
306306 tfs::lua::setCreatureMetatable (L, -1 , speaker);
307307
308308 tfs::lua::pushString (L, words);
309- lua_pushnumber (L, type);
309+ lua_pushinteger (L, type);
310310
311311 scriptInterface.callVoidFunction (4 );
312312}
@@ -332,8 +332,8 @@ void Events::eventCreatureOnChangeZone(Creature* creature, ZoneType_t fromZone,
332332 tfs::lua::pushUserdata (L, creature);
333333 tfs::lua::setCreatureMetatable (L, -1 , creature);
334334
335- lua_pushnumber (L, fromZone);
336- lua_pushnumber (L, toZone);
335+ lua_pushinteger (L, fromZone);
336+ lua_pushinteger (L, toZone);
337337
338338 scriptInterface.callVoidFunction (3 );
339339}
@@ -360,16 +360,16 @@ void Events::eventCreatureOnUpdateStorage(Creature* creature, uint32_t key, std:
360360 tfs::lua::pushUserdata (L, creature);
361361 tfs::lua::setMetatable (L, -1 , " Creature" );
362362
363- lua_pushnumber (L, key);
363+ lua_pushinteger (L, key);
364364
365365 if (value) {
366- lua_pushnumber (L, value.value ());
366+ lua_pushinteger (L, value.value ());
367367 } else {
368368 lua_pushnil (L);
369369 }
370370
371371 if (oldValue) {
372- lua_pushnumber (L, oldValue.value ());
372+ lua_pushinteger (L, oldValue.value ());
373373 } else {
374374 lua_pushnil (L);
375375 }
@@ -560,7 +560,7 @@ void Events::eventPartyOnShareExperience(Party* party, uint64_t& exp)
560560 tfs::lua::pushUserdata (L, party);
561561 tfs::lua::setMetatable (L, -1 , " Party" );
562562
563- lua_pushnumber (L, exp);
563+ lua_pushinteger (L, exp);
564564
565565 if (tfs::lua::protectedCall (L, 2 , 1 ) != 0 ) {
566566 reportErrorFunc (L, tfs::lua::popString (L));
@@ -632,7 +632,7 @@ void Events::eventPlayerOnLook(Player* player, const Position& position, Thing*
632632 }
633633
634634 tfs::lua::pushPosition (L, position, stackpos);
635- lua_pushnumber (L, lookDistance);
635+ lua_pushinteger (L, lookDistance);
636636
637637 scriptInterface.callVoidFunction (4 );
638638}
@@ -662,7 +662,7 @@ void Events::eventPlayerOnLookInBattleList(Player* player, Creature* creature, i
662662 tfs::lua::pushUserdata (L, creature);
663663 tfs::lua::setCreatureMetatable (L, -1 , creature);
664664
665- lua_pushnumber (L, lookDistance);
665+ lua_pushinteger (L, lookDistance);
666666
667667 scriptInterface.callVoidFunction (3 );
668668}
@@ -694,7 +694,7 @@ void Events::eventPlayerOnLookInTrade(Player* player, Player* partner, Item* ite
694694 tfs::lua::pushUserdata (L, item);
695695 tfs::lua::setItemMetatable (L, -1 , item);
696696
697- lua_pushnumber (L, lookDistance);
697+ lua_pushinteger (L, lookDistance);
698698
699699 scriptInterface.callVoidFunction (4 );
700700}
@@ -723,7 +723,7 @@ bool Events::eventPlayerOnLookInShop(Player* player, const ItemType* itemType, u
723723 tfs::lua::pushUserdata (L, itemType);
724724 tfs::lua::setMetatable (L, -1 , " ItemType" );
725725
726- lua_pushnumber (L, count);
726+ lua_pushinteger (L, count);
727727
728728 return scriptInterface.callFunction (3 );
729729}
@@ -781,7 +781,7 @@ ReturnValue Events::eventPlayerOnMoveItem(Player* player, Item* item, uint16_t c
781781 tfs::lua::pushUserdata (L, item);
782782 tfs::lua::setItemMetatable (L, -1 , item);
783783
784- lua_pushnumber (L, count);
784+ lua_pushinteger (L, count);
785785 tfs::lua::pushPosition (L, fromPosition);
786786 tfs::lua::pushPosition (L, toPosition);
787787
@@ -827,7 +827,7 @@ void Events::eventPlayerOnItemMoved(Player* player, Item* item, uint16_t count,
827827 tfs::lua::pushUserdata (L, item);
828828 tfs::lua::setItemMetatable (L, -1 , item);
829829
830- lua_pushnumber (L, count);
830+ lua_pushinteger (L, count);
831831 tfs::lua::pushPosition (L, fromPosition);
832832 tfs::lua::pushPosition (L, toPosition);
833833
@@ -894,8 +894,8 @@ void Events::eventPlayerOnReportRuleViolation(Player* player, const std::string&
894894
895895 tfs::lua::pushString (L, targetName);
896896
897- lua_pushnumber (L, reportType);
898- lua_pushnumber (L, reportReason);
897+ lua_pushinteger (L, reportType);
898+ lua_pushinteger (L, reportReason);
899899
900900 tfs::lua::pushString (L, comment);
901901 tfs::lua::pushString (L, translation);
@@ -927,7 +927,7 @@ bool Events::eventPlayerOnReportBug(Player* player, const std::string& message,
927927
928928 tfs::lua::pushString (L, message);
929929 tfs::lua::pushPosition (L, position);
930- lua_pushnumber (L, category);
930+ lua_pushinteger (L, category);
931931
932932 return scriptInterface.callFunction (4 );
933933}
@@ -980,7 +980,7 @@ bool Events::eventPlayerOnTurn(Player* player, Direction direction)
980980 tfs::lua::pushUserdata (L, player);
981981 tfs::lua::setMetatable (L, -1 , " Player" );
982982
983- lua_pushnumber (L, direction);
983+ lua_pushinteger (L, direction);
984984
985985 return scriptInterface.callFunction (2 );
986986}
@@ -1138,7 +1138,7 @@ void Events::eventPlayerOnPodiumEdit(Player* player, Item* item, const Outfit_t&
11381138
11391139 tfs::lua::pushOutfit (L, outfit);
11401140
1141- lua_pushnumber (L, direction);
1141+ lua_pushinteger (L, direction);
11421142 lua_pushboolean (L, podiumVisible);
11431143
11441144 scriptInterface.callFunction (5 );
@@ -1173,8 +1173,8 @@ void Events::eventPlayerOnGainExperience(Player* player, Creature* source, uint6
11731173 lua_pushnil (L);
11741174 }
11751175
1176- lua_pushnumber (L, exp);
1177- lua_pushnumber (L, rawExp);
1176+ lua_pushinteger (L, exp);
1177+ lua_pushinteger (L, rawExp);
11781178 tfs::lua::pushBoolean (L, sendText);
11791179
11801180 if (tfs::lua::protectedCall (L, 5 , 1 ) != 0 ) {
@@ -1208,7 +1208,7 @@ void Events::eventPlayerOnLoseExperience(Player* player, uint64_t& exp)
12081208 tfs::lua::pushUserdata (L, player);
12091209 tfs::lua::setMetatable (L, -1 , " Player" );
12101210
1211- lua_pushnumber (L, exp);
1211+ lua_pushinteger (L, exp);
12121212
12131213 if (tfs::lua::protectedCall (L, 2 , 1 ) != 0 ) {
12141214 reportErrorFunc (L, tfs::lua::popString (L));
@@ -1241,8 +1241,8 @@ void Events::eventPlayerOnGainSkillTries(Player* player, skills_t skill, uint64_
12411241 tfs::lua::pushUserdata (L, player);
12421242 tfs::lua::setMetatable (L, -1 , " Player" );
12431243
1244- lua_pushnumber (L, skill);
1245- lua_pushnumber (L, tries);
1244+ lua_pushinteger (L, skill);
1245+ lua_pushinteger (L, tries);
12461246
12471247 if (tfs::lua::protectedCall (L, 3 , 1 ) != 0 ) {
12481248 reportErrorFunc (L, tfs::lua::popString (L));
@@ -1305,7 +1305,7 @@ void Events::eventPlayerOnInventoryUpdate(Player* player, Item* item, slots_t sl
13051305 tfs::lua::pushUserdata (L, item);
13061306 tfs::lua::setItemMetatable (L, -1 , item);
13071307
1308- lua_pushnumber (L, slot);
1308+ lua_pushinteger (L, slot);
13091309 tfs::lua::pushBoolean (L, equip);
13101310
13111311 scriptInterface.callVoidFunction (4 );
@@ -1332,7 +1332,7 @@ void Events::eventPlayerOnNetworkMessage(Player* player, uint8_t recvByte, Netwo
13321332 tfs::lua::pushUserdata (L, player);
13331333 tfs::lua::setMetatable (L, -1 , " Player" );
13341334
1335- lua_pushnumber (L, recvByte);
1335+ lua_pushinteger (L, recvByte);
13361336
13371337 tfs::lua::pushUserdata (L, msg);
13381338 tfs::lua::setMetatable (L, -1 , " NetworkMessage" );
0 commit comments