38 #include "gui/viewport.h"
44 #include "resources/map/map.h"
63 std::string mapPath =
msg.readString(16,
"map name");
64 int x =
msg.readInt16(
"x");
65 int y =
msg.readInt16(
"y");
67 logger->
log(
"Warping to %s (%d, %d)", mapPath.c_str(),
x,
y);
70 logger->
log1(
"SMSG_PLAYER_WARP localPlayer null");
82 BLOCK_END(
"PlayerRecv::processPlayerWarp")
87 const bool sameMap = (currentMapName == mapPath);
90 mapPath = mapPath.substr(0, mapPath.rfind(
'.'));
93 int scrollOffsetX = 0;
94 int scrollOffsetY = 0;
129 logger->
log(
"Adjust scrolling by %d:%d", scrollOffsetX, scrollOffsetY);
136 BLOCK_END(
"PlayerRecv::processPlayerWarp")
141 BLOCK_START(
"PlayerRecv::processPlayerStatUpdate1")
142 const int type =
msg.readInt16(
"type");
143 const int value =
msg.readInt32(
"value");
146 BLOCK_END(
"PlayerRecv::processPlayerStatUpdate1")
151 BLOCK_END(
"PlayerRecv::processPlayerStatUpdate1")
156 BLOCK_START(
"PlayerRecv::processPlayerStatUpdate2")
157 const int type =
msg.readInt16(
"type");
158 const int value =
msg.readInt32(
"value");
160 BLOCK_END(
"PlayerRecv::processPlayerStatUpdate2")
165 BLOCK_START(
"PlayerRecv::processPlayerStatUpdate3")
166 const int type =
msg.readInt32(
"type");
167 const int base =
msg.readInt32(
"base");
168 const int bonus =
msg.readInt32(
"bonus");
171 BLOCK_END(
"PlayerRecv::processPlayerStatUpdate3")
176 BLOCK_START(
"PlayerRecv::processPlayerStatUpdate4")
177 const uint16_t type =
msg.readInt16(
"type");
178 const uint8_t
ok =
msg.readUInt8(
"flag");
179 const int value =
msg.readUInt8(
"value");
194 BLOCK_END(
"PlayerRecv::processPlayerStatUpdate4")
199 BLOCK_START(
"PlayerRecv::processPlayerStatUpdate6")
200 const int type =
msg.readInt16(
"type");
201 const int value =
msg.readUInt8(
"value");
204 BLOCK_END(
"PlayerRecv::processPlayerStatUpdate6")
209 BLOCK_START(
"PlayerRecv::processPlayerArrowMessage")
210 const int type =
msg.readInt16(
"type");
223 BLOCK_END(
"PlayerRecv::processPlayerArrowMessage")
228 const int size =
msg.readInt16(
"len") - 4;
229 const std::string music =
msg.readString(
size,
"name");
240 const int mask =
msg.readInt32(
"mask");
241 msg.readInt32(
"unused");
249 const int sz =
msg.readInt16(
"len") - 4;
250 std::string command =
msg.readString(sz,
"command");
Attributes ::T AttributesT
Map * getCurrentMap() const
void changeMap(const std::string &mapName)
const std::string & getCurrentMapName() const
void setTileCoords(const int x, const int y)
void setAction(const BeingActionT &action, const int attackId)
void stopAttack(const bool keepAttack)
void log(const char *const log_text,...)
void log1(const char *const log_text)
void setMask(const int mask)
int getTileHeight() const
void setMusicFile(const std::string &file)
virtual void setStat(Net::MessageIn &msg, const int type, const int64_t base, const int mod, const Notify notify) const =0
bool enableRemoteCommands
void playMusic(const std::string &fileName, const SkipError skipError)
void scrollBy(const int x, const int y)
static const int MAP_TELEPORT_SCROLL_DISTANCE
LocalPlayer * localPlayer
#define UNIMPLEMENTEDPACKETFIELD(field)
bool msg(InputEvent &event)
bool ok(InputEvent &event)
void processPlayerStatUpdate3(Net::MessageIn &msg)
void processPlayerClientCommand(Net::MessageIn &msg)
void processMapMask(Net::MessageIn &msg)
void processPlayerStatUpdate1(Net::MessageIn &msg)
void processPlayerWarp(Net::MessageIn &msg)
void processPlayerStatUpdate4(Net::MessageIn &msg)
void processPlayerStatUpdate2(Net::MessageIn &msg)
void processPlayerArrowMessage(Net::MessageIn &msg)
void processMapMusic(Net::MessageIn &msg)
void processPlayerStatUpdate6(Net::MessageIn &msg)
void notify(const unsigned int message)
int getStatBase(const AttributesT id)
int32_t getAttribute(const AttributesT id)
void setAttribute(const AttributesT id, const int64_t value, const Notify notify)
Net::PlayerHandler * playerHandler
#define BLOCK_START(name)
const bool SkipError_false
SoundManager soundManager
StatusWindow * statusWindow
bool parse2Str(const std::string &args, std::string &str1, std::string &str2)