ManaPlus
beingrecv.cpp
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2004-2009 The Mana World Development Team
4  * Copyright (C) 2009-2010 The Mana Developers
5  * Copyright (C) 2011-2019 The ManaPlus Developers
6  *
7  * This file is part of The ManaPlus Client.
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  */
22 
23 #include "net/ea/beingrecv.h"
24 
25 #include "actormanager.h"
26 #include "configuration.h"
27 #include "game.h"
28 #include "notifymanager.h"
29 #include "party.h"
30 
31 #include "being/localplayer.h"
32 #include "being/playerrelation.h"
33 #include "being/playerrelations.h"
34 
36 
38 
39 #include "gui/viewport.h"
40 
42 
43 #include "utils/foreach.h"
44 
45 #include "resources/map/map.h"
46 
47 #include "net/messagein.h"
48 #include "net/serverfeatures.h"
49 
50 #include "debug.h"
51 
52 namespace Ea
53 {
54 
55 namespace BeingRecv
56 {
58 } // namespace BeingRecv
59 
61 {
62  BLOCK_START("BeingRecv::processBeingRemove")
63  if ((actorManager == nullptr) || (localPlayer == nullptr))
64  {
65  BLOCK_END("BeingRecv::processBeingRemove")
66  return;
67  }
68 
69  // A being should be removed or has died
70 
71  const BeingId id = msg.readBeingId("being id");
72  const uint8_t type = msg.readUInt8("remove flag");
73  Being *const dstBeing = actorManager->findBeing(id);
74  if (dstBeing == nullptr)
75  {
76  BLOCK_END("BeingRecv::processBeingRemove")
77  return;
78  }
79 
82 
83  // If this is player's current target, clear it.
84  if (dstBeing == localPlayer->getTarget())
85  localPlayer->stopAttack(true);
86 
87  if (type == 1U)
88  {
89  if (dstBeing->getCurrentAction() != BeingAction::DEAD)
90  {
91  dstBeing->setAction(BeingAction::DEAD, 0);
92  dstBeing->recalcSpritesOrder();
93  }
94  }
95  else if (type == 0U && dstBeing->getType() == ActorType::Npc)
96  {
97  const BeingInfo *const info = dstBeing->getInfo();
98  if ((info == nullptr) || (info->getAllowDelete() != 0))
99  actorManager->destroy(dstBeing);
100  }
101  else
102  {
103  if (dstBeing->getType() == ActorType::Player)
104  {
105  if (socialWindow != nullptr)
107  const std::string name = dstBeing->getName();
108  if (!name.empty() && config.getBoolValue("logPlayerActions"))
109  {
110  switch (type)
111  {
112  case 0:
113  dstBeing->serverRemove();
114  break;
115  case 1:
118  name);
119  break;
120  case 2:
123  name);
124  break;
125  case 3:
128  name);
129  break;
130  case 4:
133  name);
134  break;
135  default:
138  name);
139  break;
140  }
141  }
142  }
143  actorManager->destroy(dstBeing);
144  }
145  BLOCK_END("BeingRecv::processBeingRemove")
146 }
147 
149 {
150  BLOCK_START("BeingRecv::processBeingAction")
151  if (actorManager == nullptr)
152  {
153  BLOCK_END("BeingRecv::processBeingAction")
154  return;
155  }
156 
157  Being *const srcBeing = actorManager->findBeing(
158  msg.readBeingId("src being id"));
159  Being *const dstBeing = actorManager->findBeing(
160  msg.readBeingId("dst being id"));
161 
162  msg.readInt32("tick");
163  const int srcSpeed = msg.readInt32("src speed");
164  msg.readInt32("dst speed");
165  const int param1 = msg.readInt16("param1");
166  msg.readInt16("param 2");
167  const AttackTypeT type = static_cast<AttackTypeT>(
168  msg.readUInt8("type"));
169  msg.readInt16("param 3");
170 
171  switch (type)
172  {
173  case AttackType::HIT: // Damage
174  case AttackType::CRITICAL: // Critical Damage
175  case AttackType::MULTI: // Critical Damage
176  case AttackType::REFLECT: // Reflected Damage
177  case AttackType::FLEE: // Lucky Dodge
178  if (srcBeing != nullptr)
179  {
180  if (srcSpeed != 0 && srcBeing->getType() == ActorType::Player)
181  srcBeing->setAttackDelay(srcSpeed);
182  // attackid=1, type
183  srcBeing->handleAttack(dstBeing, param1, 1);
184  if (srcBeing->getType() == ActorType::Player)
185  srcBeing->setAttackTime();
186  }
187  if (dstBeing != nullptr)
188  {
189  // level not present, using 1
190  dstBeing->takeDamage(srcBeing, param1,
191  static_cast<AttackTypeT>(type), 1, 1);
192  }
193  break;
194 
195  case AttackType::PICKUP:
196  break;
197  // tmw server can send here garbage?
198 // if (srcBeing)
199 // srcBeing->setAction(BeingAction::DEAD, 0);
200 
201  case AttackType::SIT:
202  if (srcBeing != nullptr)
203  {
204  srcBeing->setAction(BeingAction::SIT, 0);
205  if (srcBeing->getType() == ActorType::Player)
206  {
207  srcBeing->setMoveTime();
208  if (localPlayer != nullptr)
210  }
211  }
212  break;
213 
214  case AttackType::STAND:
215  if (srcBeing != nullptr)
216  {
217  srcBeing->setAction(BeingAction::STAND, 0);
218  if (srcBeing->getType() == ActorType::Player)
219  {
220  srcBeing->setMoveTime();
221  if (localPlayer != nullptr)
222  {
223  localPlayer->imitateAction(srcBeing,
225  }
226  }
227  }
228  break;
229  default:
230  case AttackType::SPLASH:
231  case AttackType::SKILL:
232  case AttackType::REPEATE:
235  case AttackType::MISS:
238  break;
239  }
240  BLOCK_END("BeingRecv::processBeingAction")
241 }
242 
244 {
245  BLOCK_START("BeingRecv::processBeingEmotion")
246  if ((localPlayer == nullptr) || (actorManager == nullptr))
247  {
248  BLOCK_END("BeingRecv::processBeingEmotion")
249  return;
250  }
251 
252  Being *const dstBeing = actorManager->findBeing(
253  msg.readBeingId("being id"));
254  if (dstBeing == nullptr)
255  {
256  DEBUGLOGSTR("invisible player?");
257  msg.readUInt8("emote");
258  BLOCK_END("BeingRecv::processBeingEmotion")
259  return;
260  }
261 
262  const uint8_t emote = msg.readUInt8("emote");
263  if ((emote != 0U) &&
265  {
266  dstBeing->setEmote(emote, 0);
267  localPlayer->imitateEmote(dstBeing, emote);
268  }
269  if (dstBeing->getType() == ActorType::Player)
270  dstBeing->setOtherTime();
271  BLOCK_END("BeingRecv::processBeingEmotion")
272 }
273 
275 {
276  BLOCK_START("BeingRecv::processNameResponse")
277  if ((localPlayer == nullptr) || (actorManager == nullptr))
278  {
279  BLOCK_END("BeingRecv::processNameResponse")
280  return;
281  }
282 
283  const BeingId beingId = msg.readBeingId("being id");
284  const std::string name = msg.readString(24, "name");
285  Being *const dstBeing = actorManager->findBeing(beingId);
286 
287  actorManager->updateNameId(name, beingId);
288 
289  if (dstBeing != nullptr)
290  {
291  if (beingId == localPlayer->getId())
292  {
294  }
295  else
296  {
297  if (dstBeing->getType() != ActorType::Portal)
298  {
299  dstBeing->setName(name);
300  }
301  else if (viewport != nullptr)
302  {
303  Map *const map = viewport->getMap();
304  if (map != nullptr)
305  {
307  dstBeing->getTileX(), dstBeing->getTileY());
308  }
309  }
310  dstBeing->updateGuild();
311  dstBeing->addToCache();
312 
313  if (dstBeing->getType() == ActorType::Player)
314  dstBeing->updateColors();
315 
316  if (localPlayer != nullptr)
317  {
318  const Party *const party = localPlayer->getParty();
319  if (party != nullptr && party->isMember(dstBeing->getId()))
320  {
321  PartyMember *const member = party->getMember(
322  dstBeing->getId());
323 
324  if (member != nullptr)
325  member->setName(dstBeing->getName());
326  }
327  localPlayer->checkNewName(dstBeing);
328  }
329  BLOCK_END("BeingRecv::processNameResponse")
330  return;
331  }
332  }
333  BLOCK_END("BeingRecv::processNameResponse")
334 }
335 
337 {
338  BLOCK_START("BeingRecv::processPlayerStop")
339  if ((actorManager == nullptr) || (localPlayer == nullptr))
340  {
341  BLOCK_END("BeingRecv::processPlayerStop")
342  return;
343  }
344 
345  const BeingId id = msg.readBeingId("account id");
346 
347 // if (mSync || id != localPlayer->getId())
348  {
349  Being *const dstBeing = actorManager->findBeing(id);
350  if (dstBeing != nullptr)
351  {
352  const uint16_t x = msg.readInt16("x");
353  const uint16_t y = msg.readInt16("y");
354  dstBeing->setTileCoords(x, y);
355  if (dstBeing->getCurrentAction() == BeingAction::MOVE)
356  dstBeing->setAction(BeingAction::STAND, 0);
357  BLOCK_END("BeingRecv::processPlayerStop")
358  return;
359  }
360  }
361  msg.readInt16("x");
362  msg.readInt16("y");
363  BLOCK_END("BeingRecv::processPlayerStop")
364 }
365 
367 {
368  BLOCK_START("BeingRecv::processPlayerStop")
369  msg.readInt32("target id");
370  msg.readInt16("target x");
371  msg.readInt16("target y");
372  msg.readInt16("x");
373  msg.readInt16("y");
374  msg.readInt16("attack range");
375 
376  if (localPlayer != nullptr)
378  BLOCK_END("BeingRecv::processPlayerStop")
379 }
380 
382 {
383  if (actorManager == nullptr)
384  return;
385  const int id = msg.readInt16("skill id");
386  int heal;
387  if (msg.getVersion() >= 20131223)
388  heal = msg.readInt32("heal");
389  else
390  heal = msg.readInt16("heal");
391  Being *const dstBeing = actorManager->findBeing(
392  msg.readBeingId("dst being id"));
393  Being *const srcBeing = actorManager->findBeing(
394  msg.readBeingId("src being id"));
395  msg.readUInt8("fail");
396 
397  if (srcBeing != nullptr)
398  srcBeing->handleSkill(dstBeing, heal, id, 1);
399 }
400 
402 {
403  BLOCK_START("BeingRecv::processPvpMapMode")
404  const Game *const game = Game::instance();
405  if (game == nullptr)
406  {
407  BLOCK_END("BeingRecv::processPvpMapMode")
408  return;
409  }
410 
411  Map *const map = game->getCurrentMap();
412  if (map != nullptr)
413  map->setPvpMode(msg.readInt16("pvp mode"));
414  BLOCK_END("BeingRecv::processPvpMapMode")
415 }
416 
418 {
419  BLOCK_START("BeingRecv::processBeingMove3")
420  if ((actorManager == nullptr) || !serverFeatures->haveMove3())
421  {
422  BLOCK_END("BeingRecv::processBeingMove3")
423  return;
424  }
425 
426  static const int16_t dirx[8] = {0, -1, -1, -1, 0, 1, 1, 1};
427  static const int16_t diry[8] = {1, 1, 0, -1, -1, -1, 0, 1};
428 
429  const int len = msg.readInt16("len") - 14;
430  Being *const dstBeing = actorManager->findBeing(
431  msg.readBeingId("being id"));
432  if (dstBeing == nullptr ||
433  dstBeing == localPlayer)
434  {
435  DEBUGLOGSTR("invisible player?");
436  msg.readInt16("speed");
437  msg.readInt16("x");
438  msg.readInt16("y");
439  unsigned char *bytes = msg.readBytes(len, "moving path");
440  delete [] bytes;
441  BLOCK_END("BeingRecv::processBeingMove3")
442  return;
443  }
444  const int16_t speed = msg.readInt16("speed");
445  dstBeing->setWalkSpeed(speed);
446  const int16_t x = msg.readInt16("x");
447  const int16_t y = msg.readInt16("y");
448  const unsigned char *moves = msg.readBytes(len, "moving path");
449 
450  Path path;
451  if (moves != nullptr)
452  {
453  int x2 = dstBeing->getCachedX();
454  int y2 = dstBeing->getCachedY();
455  Path path2;
456  path2.push_back(Position(x2, y2));
457  for (int f = len - 1; f >= 0; f --)
458  {
459  const unsigned char dir = moves[f];
460  if (dir <= 7)
461  {
462  x2 -= dirx[dir];
463  y2 -= diry[dir];
464  // fix possible wrong move outside of map
465  if (x2 < 0)
466  x2 = 0;
467  if (y2 < 0)
468  y2 = 0;
469  path2.push_back(Position(x2, y2));
470  if (x2 == x && y2 == y)
471  break;
472  }
473  else
474  {
475  logger->log("bad move packet: %d", dir);
476  }
477  }
478 
479  if (!path2.empty())
480  {
481  const Position &pos = path2.back();
482  if (x != pos.x ||
483  y != pos.y)
484  {
485  dstBeing->setTileCoords(pos.x, pos.y);
486  }
487  }
488 
489  path2.pop_back();
490  FOR_EACHR (PathRIterator, it, path2)
491  {
492  path.push_back(*it);
493  }
494  delete [] moves;
495  }
496 
497  if (path.empty())
498  return;
499 
500  dstBeing->setAction(BeingAction::STAND, 0);
501  dstBeing->setTileCoords(x, y);
502  dstBeing->setPath(path);
503  BLOCK_END("BeingRecv::processBeingMove3")
504 }
505 
507  const int job)
508 {
509  if (actorManager == nullptr)
510  return nullptr;
511 
513  if (job <= 25 || (job >= 4001 && job <= 4049))
514  type = ActorType::Player;
515  else if (job >= 46 && job <= 1000)
516  type = ActorType::Npc;
517  else if (job > 1000 && job <= 2000)
518  type = ActorType::Monster;
519  else if (job == 45)
520  type = ActorType::Portal;
521 
522  return actorManager->createBeing(
523  id, type, fromInt(job, BeingTypeId));
524 }
525 
526 } // namespace Ea
Ea::BeingRecv::processPvpMapMode
void processPvpMapMode(Net::MessageIn &msg)
Definition: beingrecv.cpp:401
Net::MessageIn
Definition: messagein.h:40
ActorType::Unknown
@ Unknown
Definition: actortype.h:29
Being::setAttackTime
void setAttackTime()
Definition: being.h:708
Ea::BeingRecv::processPlayerStop
void processPlayerStop(Net::MessageIn &msg)
Definition: beingrecv.cpp:336
Being::getCachedY
int getCachedY() const
Definition: being.h:155
Being::handleAttack
void handleAttack(Being *const victim, const int damage, const int attackId)
Definition: being.cpp:962
Position::x
int x
Definition: position.h:44
Ea::BeingRecv::mSpawnId
BeingId mSpawnId
Definition: beingrecv.cpp:57
LocalPlayer::getNextDestY
int getNextDestY() const
Definition: localplayer.h:316
CastType::Position
@ Position
Definition: casttype.h:30
BeingId
int BeingId
Definition: beingid.h:29
AttackType::SPLASH
@ SPLASH
Definition: attacktype.h:35
NotifyTypes::BEING_REMOVE_LOGGED_OUT
@ BEING_REMOVE_LOGGED_OUT
Definition: notifytypes.h:219
playerrelation.h
AttackType::MULTI
@ MULTI
Definition: attacktype.h:38
notifymanager.h
Avatar::setName
void setName(const std::string &name)
Definition: avatar.h:58
Being::setAttackDelay
void setAttackDelay(const int n)
Definition: being.h:769
NotifyTypes::BEING_REMOVE_UNKNOWN
@ BEING_REMOVE_UNKNOWN
Definition: notifytypes.h:222
Being::getParty
Party * getParty() const
Definition: being.h:329
Being::setMoveTime
void setMoveTime()
Definition: being.h:705
ActorManager::createBeing
Being * createBeing(const BeingId id, const ActorTypeT type, const BeingTypeId subtype)
Definition: actormanager.cpp:282
BeingInfo
Definition: beinginfo.h:52
PlayerRelation::EMOTE
static const unsigned int EMOTE
Definition: playerrelation.h:32
AttackType::STAND
@ STAND
Definition: attacktype.h:33
BeingAction::DEAD
@ DEAD
Definition: beingaction.h:35
Being::setTileCoords
virtual void setTileCoords(const int x, const int y)
Definition: being.cpp:5007
BeingTypeId
int BeingTypeId
Definition: beingtypeid.h:29
Being::updateColors
void updateColors()
Definition: being.cpp:2660
Actions::msg
bool msg(InputEvent &event)
Definition: chat.cpp:38
BeingAction::SIT
@ SIT
Definition: beingaction.h:34
Path
std::list< Position > Path
Definition: position.h:48
ActorSprite::getId
BeingId getId() const
Definition: actorsprite.h:63
Being::setOtherTime
void setOtherTime()
Definition: being.h:717
Ea::BeingRecv::processSkillNoDamage
void processSkillNoDamage(Net::MessageIn &msg)
Definition: beingrecv.cpp:381
Being::setEmote
void setEmote(const uint8_t emotion, const int emote_time)
Definition: being.cpp:4826
Being::addToCache
void addToCache() const
Definition: being.cpp:3510
AttackType::TOUCH_SKILL
@ TOUCH_SKILL
Definition: attacktype.h:42
LocalPlayer::pingResponse
void pingResponse()
Definition: localplayer.cpp:2023
notifytypes.h
actorManager
ActorManager * actorManager
Definition: actormanager.cpp:80
NotifyManager::notify
void notify(const unsigned int message)
Definition: notifymanager.cpp:81
LocalPlayer::imitateEmote
void imitateEmote(const Being *const being, const unsigned char action) const
Definition: localplayer.cpp:2420
Game::instance
static Game * instance()
Definition: game.h:81
ActorManager::updateNameId
void updateNameId(const std::string &name, const BeingId beingId)
Definition: actormanager.cpp:2159
LocalPlayer::getNextDestX
int getNextDestX() const
Definition: localplayer.h:313
socialWindow
SocialWindow * socialWindow
Definition: socialwindow.cpp:48
Being::getCachedX
int getCachedX() const
Definition: being.h:152
Ea::BeingRecv::processBeingAction
void processBeingAction(Net::MessageIn &msg)
Definition: beingrecv.cpp:148
Being::setPath
void setPath(const Path &path)
Definition: being.cpp:558
PartyMember
Definition: party.h:36
Net::ServerFeatures::haveMove3
virtual bool haveMove3() const =0
ActorType::Player
@ Player
Definition: actortype.h:30
Position::y
int y
Definition: position.h:45
Being::serverRemove
void serverRemove()
Definition: being.cpp:5360
Map::setPvpMode
void setPvpMode(const int mode)
Definition: map.cpp:1360
AttackType::PICKUP
@ PICKUP
Definition: attacktype.h:31
logger
Logger * logger
Definition: logger.cpp:88
LocalPlayer::stopAttack
void stopAttack(const bool keepAttack)
Definition: localplayer.cpp:864
AttackType::MULTI_REFLECT
@ MULTI_REFLECT
Definition: attacktype.h:39
serverFeatures
Net::ServerFeatures * serverFeatures
Definition: net.cpp:100
AttackTypeT
AttackType ::T AttackTypeT
Definition: attacktype.h:46
LocalPlayer::checkNewName
void checkNewName(Being *const being)
Definition: localplayer.cpp:2781
Actions::info
bool info(InputEvent &event)
Definition: commands.cpp:56
Ea::BeingRecv::processBeingEmotion
void processBeingEmotion(Net::MessageIn &msg)
Definition: beingrecv.cpp:243
Ea::BeingRecv::processBeingMove3
void processBeingMove3(Net::MessageIn &msg)
Definition: beingrecv.cpp:417
party.h
localplayer.h
ActorManager::findBeing
Being * findBeing(const BeingId id) const
Definition: actormanager.cpp:422
LocalPlayer::imitateAction
void imitateAction(const Being *const being, const BeingActionT &action)
Definition: localplayer.cpp:2431
localPlayer
LocalPlayer * localPlayer
Definition: localplayer.cpp:108
FOR_EACHR
#define FOR_EACHR(type, iter, array)
Definition: foreach.h:27
Ea::BeingRecv::processBeingRemove
void processBeingRemove(Net::MessageIn &msg)
Definition: beingrecv.cpp:60
Being::setWalkSpeed
void setWalkSpeed(const int speed)
Definition: being.h:451
Being::getName
const std::string & getName() const
Definition: being.h:231
Being::updateGuild
void updateGuild()
Definition: being.cpp:1332
AttackType::SKILLMISS
@ SKILLMISS
Definition: attacktype.h:44
AttackType::MISS
@ MISS
Definition: attacktype.h:43
BeingAction::STAND
@ STAND
Definition: beingaction.h:30
Ea::BeingRecv::processNameResponse
void processNameResponse(Net::MessageIn &msg)
Definition: beingrecv.cpp:274
Actions::emote
bool emote(InputEvent &event)
Definition: actions.cpp:30
Being::setAction
virtual void setAction(const BeingActionT &action, const int attackId)
Definition: being.cpp:1553
actormanager.h
Ea::BeingRecv::processPlayerMoveToAttack
void processPlayerMoveToAttack(Net::MessageIn &msg)
Definition: beingrecv.cpp:366
x
x
Definition: graphics_calcImageRect.hpp:72
Being::handleSkill
void handleSkill(Being *const victim, const int damage, const int skillId, const int skillLevel)
Definition: being.cpp:1049
Party
Definition: party.h:61
PlayerRelationsManager::hasPermission
bool hasPermission(const Being *const being, const unsigned int flags) const
Definition: playerrelations.cpp:313
PathRIterator
Path::reverse_iterator PathRIterator
Definition: position.h:50
Being
Definition: being.h:93
ActorTypeT
ActorType ::T ActorTypeT
Definition: actortype.h:42
NotifyTypes::BEING_REMOVE_WARPED
@ BEING_REMOVE_WARPED
Definition: notifytypes.h:220
SocialWindow::updateActiveList
void updateActiveList()
Definition: socialwindow.cpp:499
AttackType::HIT
@ HIT
Definition: attacktype.h:30
AttackType::SKILL
@ SKILL
Definition: attacktype.h:36
Actions::heal
bool heal(InputEvent &event)
Definition: actions.cpp:42
Ea::BeingRecv::createBeing
Being * createBeing(const BeingId id, const int job)
Definition: beingrecv.cpp:506
viewport
Viewport * viewport
Definition: viewport.cpp:35
AttackType::REFLECT
@ REFLECT
Definition: attacktype.h:34
Being::getInfo
const BeingInfo * getInfo() const
Definition: being.h:408
Game::getCurrentMap
Map * getCurrentMap() const
Definition: game.h:106
config
Configuration config
Definition: configuration.cpp:51
playerRelations
PlayerRelationsManager playerRelations
Definition: playerrelations.cpp:661
Viewport::getMap
Map * getMap() const
Definition: viewport.h:134
AttackType::FLEE
@ FLEE
Definition: attacktype.h:41
Being::getCurrentAction
BeingActionT getCurrentAction() const
Definition: being.h:481
AttackType::REPEATE
@ REPEATE
Definition: attacktype.h:37
Being::takeDamage
void takeDamage(Being *const attacker, const int amount, const AttackTypeT type, const int attackId, const int level)
Definition: being.cpp:666
foreach.h
UNIMPLEMENTEDPACKETFIELD
#define UNIMPLEMENTEDPACKETFIELD(field)
Definition: logger.h:58
Being::getType
ActorTypeT getType() const
Definition: being.h:115
LocalPlayer::getTarget
Being * getTarget() const
Definition: localplayer.cpp:561
ActorType::Npc
@ Npc
Definition: actortype.h:31
ActorType::Monster
@ Monster
Definition: actortype.h:32
Ea
Definition: adminhandler.cpp:30
socialwindow.h
AttackType::SIT
@ SIT
Definition: attacktype.h:32
configuration.h
MapItemType::PORTAL
@ PORTAL
Definition: mapitemtype.h:36
Map
Definition: map.h:71
fromInt
#define fromInt(val, name)
Definition: intdefines.h:45
NotifyTypes::BEING_REMOVE_TRICK_DEAD
@ BEING_REMOVE_TRICK_DEAD
Definition: notifytypes.h:221
Being::setName
void setName(const std::string &name)
Definition: being.cpp:1135
serverfeatures.h
BLOCK_START
#define BLOCK_START(name)
Definition: perfomance.h:78
BLOCK_END
#define BLOCK_END(name)
Definition: perfomance.h:79
CAST_S32
#define CAST_S32
Definition: cast.h:29
game.h
NotifyTypes::BEING_REMOVE_DIED
@ BEING_REMOVE_DIED
Definition: notifytypes.h:218
party
uint32_t party
Definition: maptypeproperty2.h:4
Map::addPortalTile
void addPortalTile(const std::string &name, const int type, const int x, const int y)
Definition: map.cpp:1299
DEBUGLOGSTR
#define DEBUGLOGSTR(str)
Definition: logger.h:44
Being::recalcSpritesOrder
void recalcSpritesOrder()
Definition: being.cpp:4356
Position
Definition: position.h:34
ActorManager::destroy
void destroy(ActorSprite *const actor)
Definition: actormanager.cpp:382
BeingId_zero
const BeingId BeingId_zero
Definition: beingid.h:29
Being::getTileY
int getTileY() const
Definition: being.h:173
BeingAction::MOVE
@ MOVE
Definition: beingaction.h:31
Game
Definition: game.h:62
beingrecv.h
mapitemtype.h
ActorType::Portal
@ Portal
Definition: actortype.h:34
y
y
Definition: graphics_calcImageRect.hpp:72
LocalPlayer::fixAttackTarget
void fixAttackTarget()
Definition: localplayer.cpp:2715
messagein.h
Logger::log
void log(const char *const log_text,...)
Definition: logger.cpp:268
debug.h
Being::getTileX
int getTileX() const
Definition: being.h:167
playerrelations.h
AttackType::CRITICAL
@ CRITICAL
Definition: attacktype.h:40
Configuration::getBoolValue
bool getBoolValue(const std::string &key) const
Definition: configuration.cpp:596
LocalPlayer::followMoveTo
void followMoveTo(const Being *const being, const int x, const int y)
Definition: localplayer.cpp:2531