41 #include "resources/map/map.h"
43 #include "utils/timer.h"
51 mDisableCrazyMove(false)
366 static const int movesX[][4] =
376 static const int movesY[][4] =
408 if (map->
getWalk(
x + movesX[idx][0],
411 while (map->
getWalk(
x + movesX[idx][0] * mult,
412 y + movesY[idx][0] * mult,
418 movesY[idx][0] * (mult - 1));
420 else if (map->
getWalk(
x + movesX[idx][1],
423 while (map->
getWalk(
x + movesX[idx][1] * mult,
424 y + movesY[idx][1] * mult,
430 movesY[idx][1] * (mult - 1));
432 else if (map->
getWalk(
x + movesX[idx][2],
435 while (map->
getWalk(
x + movesX[idx][2] * mult,
436 y + movesY[idx][2] * mult,
442 movesY[idx][2] * (mult - 1));
444 else if (map->
getWalk(
x + movesX[idx][3],
447 while (map->
getWalk(
x + movesX[idx][3] * mult,
448 y + movesY[idx][3] * mult,
454 movesY[idx][3] * (mult - 1));
515 const char cmd[] = {
'l',
'r',
'u',
'd',
'L',
'R',
'U',
'D'};
517 param = cmd[rand() % 8];
588 const char cmd[] = {
'l',
'r',
'u',
'd'};
590 param = cmd[rand() % 4];
744 unsigned char emoteId = 0;
753 if (emo >=
'0' && emo <=
'9')
754 emoteId =
CAST_U8(emo -
'0' + 1);
755 else if (emo >=
'a' && emo <=
'z')
756 emoteId =
CAST_U8(emo -
'a' + 11);
757 else if (emo >=
'A' && emo <=
'Z')
758 emoteId =
CAST_U8(emo -
'A' + 37);
const Map * getMap() const
virtual void setDirection(const uint8_t direction)
uint8_t getDirection() const
BeingActionT getCurrentAction() const
std::string getStringValue(const std::string &key) const
static void crazyMoveAs()
void dropItems(const int cnt)
void setWalkingDir(const unsigned char dir)
bool pickUpItems(int pickUpType)
void move(const int dX, const int dY)
static bool emote(const uint8_t emotion)
unsigned char getBlockWalkMask() const A_CONST
bool getWalk(const int x, const int y, const unsigned char blockWalkMask) const
virtual void emote(const uint8_t emoteId)=0
virtual void setDirection(const unsigned char direction) const =0
virtual void changeAction(const BeingActionT &action) const =0
void wearNextOutfit(const bool all)
void wearPreviousOutfit(const bool all)
unsigned int crazyMoveState
unsigned int crazyMoveType
DropShortcut * dropShortcut
LocalPlayer * localPlayer
bool limitPackets(const PacketTypeT type)
static const int blockWalkMask
Net::PetHandler * petHandler
Net::PlayerHandler * playerHandler
OutfitWindow * outfitWindow