MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / OnAddMagic

Function OnAddMagic

Source/msg.cpp:933–943  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

931}
932
933size_t OnAddMagic(const TCmd *pCmd, size_t pnum)
934{
935 const auto &message = *reinterpret_cast<const TCmdParam1 *>(pCmd);
936
937 if (gbBufferMsgs == 1)
938 SendPacket(pnum, &message, sizeof(message));
939 else if (message.wParam1 <= 256)
940 ModifyPlrMag(Players[pnum], SDL_SwapLE16(message.wParam1));
941
942 return sizeof(message);
943}
944
945size_t OnAddDexterity(const TCmd *pCmd, int pnum)
946{

Callers 1

ParseCmdFunction · 0.85

Calls 2

ModifyPlrMagFunction · 0.85
SendPacketFunction · 0.70

Tested by

no test coverage detected