… | |
… | |
2023 | return 0; |
2023 | return 0; |
2024 | } |
2024 | } |
2025 | |
2025 | |
2026 | if (weapon->nrof > 1) |
2026 | if (weapon->nrof > 1) |
2027 | { |
2027 | { |
2028 | tmp = get_split_ob (weapon, 1); |
2028 | tmp = weapon->split (); |
2029 | esrv_send_item (op, weapon); |
2029 | esrv_send_item (op, weapon); |
2030 | weapon = tmp; |
2030 | weapon = tmp; |
2031 | } |
2031 | } |
2032 | |
2032 | |
2033 | /* create the golem object */ |
2033 | /* create the golem object */ |
… | |
… | |
2041 | tmp->set_owner (op); |
2041 | tmp->set_owner (op); |
2042 | op->contr->golem = tmp; |
2042 | op->contr->golem = tmp; |
2043 | set_spell_skill (op, caster, spell, tmp); |
2043 | set_spell_skill (op, caster, spell, tmp); |
2044 | |
2044 | |
2045 | /* Give the weapon to the golem now. A bit of a hack to check the |
2045 | /* Give the weapon to the golem now. A bit of a hack to check the |
2046 | * removed flag - it should only be set if get_split_object was |
2046 | * removed flag - it should only be set if weapon->split was |
2047 | * used above. |
2047 | * used above. |
2048 | */ |
2048 | */ |
2049 | if (!QUERY_FLAG (weapon, FLAG_REMOVED)) |
2049 | if (!QUERY_FLAG (weapon, FLAG_REMOVED)) |
2050 | weapon->remove (); |
2050 | weapon->remove (); |
2051 | |
2051 | |