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

Function SetupAllUseful

Source/items.cpp:2179–2197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2177}
2178
2179void SetupAllUseful(int ii, int iseed, int lvl)
2180{
2181 int idx;
2182
2183 item[ii]._iSeed = iseed;
2184 SetRndSeed(iseed);
2185
2186 if (random_(34, 2))
2187 idx = IDI_HEAL;
2188 else
2189 idx = IDI_MANA;
2190
2191 if (lvl > 1 && !random_(34, 3))
2192 idx = IDI_PORTAL;
2193
2194 GetItemAttrs(ii, idx, lvl);
2195 item[ii]._iCreateInfo = lvl + 384;
2196 SetupItem(ii);
2197}
2198
2199void CreateRndUseful(int pnum, int x, int y, BOOL sendmsg)
2200{

Callers 2

CreateRndUsefulFunction · 0.85
RecreateItemFunction · 0.85

Calls 4

SetRndSeedFunction · 0.85
random_Function · 0.85
GetItemAttrsFunction · 0.85
SetupItemFunction · 0.85

Tested by

no test coverage detected