MCPcopy Create free account
hub / github.com/diasurgical/devilution / SetPlayerHitPoints

Function SetPlayerHitPoints

Source/player.cpp:4041–4053  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4039}
4040
4041void SetPlayerHitPoints(int pnum, int val)
4042{
4043 if ((DWORD)pnum >= MAX_PLRS) {
4044 app_fatal("SetPlayerHitPoints: illegal player %d", pnum);
4045 }
4046
4047 plr[pnum]._pHitPoints = val;
4048 plr[pnum]._pHPBase = val + plr[pnum]._pMaxHPBase - plr[pnum]._pMaxHP;
4049
4050 if (pnum == myplr) {
4051 drawhpflag = TRUE;
4052 }
4053}
4054
4055void SetPlrStr(int p, int v)
4056{

Callers 6

DoResurrectFunction · 0.85
MI_ManashieldFunction · 0.85
StartPlayerKillFunction · 0.85
SyncPlrKillFunction · 0.85
RestartTownLvlFunction · 0.85
CalcPlrItemValsFunction · 0.85

Calls 1

app_fatalFunction · 0.85

Tested by

no test coverage detected