mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
improvment in connect
This commit is contained in:
@@ -473,19 +473,19 @@ void Creature::setOutfit(const Outfit& outfit)
|
||||
void Creature::setSkull(uint8 skull)
|
||||
{
|
||||
m_skull = skull;
|
||||
g_lua.callGlobalField("Creature","onSkullChange", asCreature(), m_skull);
|
||||
callLuaField("onSkullChange", m_skull);
|
||||
}
|
||||
|
||||
void Creature::setShield(uint8 shield)
|
||||
{
|
||||
m_shield = shield;
|
||||
g_lua.callGlobalField("Creature","onShieldChange", asCreature(), m_shield);
|
||||
callLuaField("onShieldChange", m_shield);
|
||||
}
|
||||
|
||||
void Creature::setEmblem(uint8 emblem)
|
||||
{
|
||||
m_emblem = emblem;
|
||||
g_lua.callGlobalField("Creature","onEmblemChange", asCreature(), m_emblem);
|
||||
callLuaField("onEmblemChange", m_emblem);
|
||||
}
|
||||
|
||||
void Creature::setSkullTexture(const std::string& filename)
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include <otclient/global.h>
|
||||
|
||||
class Map;
|
||||
class Game;
|
||||
class MapView;
|
||||
class Tile;
|
||||
class Thing;
|
||||
|
@@ -21,10 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "effect.h"
|
||||
#include "thingstype.h"
|
||||
#include "map.h"
|
||||
#include "tile.h"
|
||||
#include <framework/core/clock.h>
|
||||
#include <framework/core/eventdispatcher.h>
|
||||
|
||||
void Effect::draw(const Point& dest, float scaleFactor, bool animate)
|
||||
|
@@ -64,7 +64,7 @@ void Game::processConnectionError(const boost::system::error_code& error)
|
||||
void Game::processDisconnect()
|
||||
{
|
||||
if(isOnline()) {
|
||||
// only process logout event if a previous the player is known
|
||||
// only process logout event if the player is known
|
||||
if(m_localPlayer->isKnown())
|
||||
processLogout();
|
||||
|
||||
@@ -86,7 +86,7 @@ void Game::processLoginError(const std::string& error)
|
||||
|
||||
void Game::processLoginAdvice(const std::string& message)
|
||||
{
|
||||
g_lua.callGlobalField("Game," "onLoginAdvice", message);
|
||||
g_lua.callGlobalField("g_game", "onLoginAdvice", message);
|
||||
}
|
||||
|
||||
void Game::processLoginWait(const std::string& message, int time)
|
||||
@@ -113,7 +113,7 @@ void Game::processGameEnd()
|
||||
{
|
||||
g_lua.callGlobalField("g_game", "onGameEnd");
|
||||
|
||||
// reset game states
|
||||
// reset game state
|
||||
resetGameStates();
|
||||
}
|
||||
|
||||
@@ -232,9 +232,7 @@ void Game::processOpenContainer(int containerId, int itemId, const std::string&
|
||||
|
||||
void Game::processContainerAddItem(int containerId, const ItemPtr& item)
|
||||
{
|
||||
if(item)
|
||||
item->setPosition(Position(65535, containerId + 0x40, 0));
|
||||
|
||||
item->setPosition(Position(65535, containerId + 0x40, 0));
|
||||
g_lua.callGlobalField("g_game", "onContainerAddItem", containerId, item);
|
||||
}
|
||||
|
||||
|
@@ -156,5 +156,3 @@ void LocalPlayer::terminateWalk()
|
||||
Creature::terminateWalk();
|
||||
m_preWalking = false;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user