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

Function OperateArmorStand

Source/objects.cpp:3271–3291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3269}
3270
3271void OperateArmorStand(Object &armorStand, bool sendmsg, bool sendLootMsg)
3272{
3273 if (armorStand._oSelFlag == 0) {
3274 return;
3275 }
3276 armorStand._oSelFlag = 0;
3277 armorStand._oAnimFrame++;
3278 SetRndSeed(armorStand._oRndSeed);
3279 bool uniqueRnd = !FlipCoin();
3280 if (currlevel <= 5) {
3281 CreateTypeItem(armorStand.position, true, ItemType::LightArmor, IMISC_NONE, sendLootMsg, false);
3282 } else if (currlevel >= 6 && currlevel <= 9) {
3283 CreateTypeItem(armorStand.position, uniqueRnd, ItemType::MediumArmor, IMISC_NONE, sendLootMsg, false);
3284 } else if (currlevel >= 10 && currlevel <= 12) {
3285 CreateTypeItem(armorStand.position, false, ItemType::HeavyArmor, IMISC_NONE, sendLootMsg, false);
3286 } else if (currlevel >= 13) {
3287 CreateTypeItem(armorStand.position, true, ItemType::HeavyArmor, IMISC_NONE, sendLootMsg, false);
3288 }
3289 if (sendmsg)
3290 NetSendCmdLoc(MyPlayerId, false, CMD_OPERATEOBJ, armorStand.position);
3291}
3292
3293int FindValidShrine()
3294{

Callers 2

OperateObjectFunction · 0.85
SyncOpObjectFunction · 0.85

Calls 4

SetRndSeedFunction · 0.85
FlipCoinFunction · 0.85
CreateTypeItemFunction · 0.85
NetSendCmdLocFunction · 0.85

Tested by

no test coverage detected