| 2230 | } |
| 2231 | |
| 2232 | void OperateSlainHero(const Player &player, Object &corpse, bool sendmsg) |
| 2233 | { |
| 2234 | if (corpse._oSelFlag == 0) { |
| 2235 | return; |
| 2236 | } |
| 2237 | corpse._oSelFlag = 0; |
| 2238 | |
| 2239 | SetRndSeed(corpse._oRndSeed); |
| 2240 | |
| 2241 | if (player._pClass == HeroClass::Warrior) { |
| 2242 | CreateMagicArmor(corpse.position, ItemType::HeavyArmor, ICURS_BREAST_PLATE, sendmsg, false); |
| 2243 | } else if (player._pClass == HeroClass::Rogue) { |
| 2244 | CreateMagicWeapon(corpse.position, ItemType::Bow, ICURS_LONG_BATTLE_BOW, sendmsg, false); |
| 2245 | } else if (player._pClass == HeroClass::Sorcerer) { |
| 2246 | CreateSpellBook(corpse.position, SpellID::Lightning, sendmsg, false); |
| 2247 | } else if (player._pClass == HeroClass::Monk) { |
| 2248 | CreateMagicWeapon(corpse.position, ItemType::Staff, ICURS_WAR_STAFF, sendmsg, false); |
| 2249 | } else if (player._pClass == HeroClass::Bard) { |
| 2250 | CreateMagicWeapon(corpse.position, ItemType::Sword, ICURS_BASTARD_SWORD, sendmsg, false); |
| 2251 | } else if (player._pClass == HeroClass::Barbarian) { |
| 2252 | CreateMagicWeapon(corpse.position, ItemType::Axe, ICURS_BATTLE_AXE, sendmsg, false); |
| 2253 | } |
| 2254 | MyPlayer->Say(HeroSpeech::RestInPeaceMyFriend); |
| 2255 | if (sendmsg) |
| 2256 | NetSendCmdLoc(MyPlayerId, false, CMD_OPERATEOBJ, corpse.position); |
| 2257 | } |
| 2258 | |
| 2259 | void OperateTrapLever(Object &flameLever) |
| 2260 | { |
no test coverage detected