… | |
… | |
839 | /* elmex: this is for the bank plugin :( */ |
839 | /* elmex: this is for the bank plugin :( */ |
840 | sint64 |
840 | sint64 |
841 | pay_player_arch (object *pl, const char *arch, sint64 amount) |
841 | pay_player_arch (object *pl, const char *arch, sint64 amount) |
842 | { |
842 | { |
843 | archetype *at = archetype::find (arch); |
843 | archetype *at = archetype::find (arch); |
844 | object *tmp = NULL; |
|
|
845 | |
844 | |
846 | if (at == NULL) |
845 | if (!at) |
847 | return 0; |
846 | return 0; |
848 | |
847 | |
849 | if (amount > 0) |
848 | if (amount > 0) |
850 | { |
849 | { |
851 | tmp = arch_to_object (at); |
850 | object *tmp = arch_to_object (at); |
852 | tmp->nrof = amount; |
851 | tmp->nrof = amount; |
853 | tmp = insert_ob_in_ob (tmp, pl); |
852 | tmp = insert_ob_in_ob (tmp, pl); |
854 | esrv_send_item (pl, tmp); |
853 | esrv_send_item (pl, tmp); |
855 | esrv_send_item (pl, pl); |
854 | esrv_send_item (pl, pl); |
856 | } |
855 | } |