1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify |
8 | * Deliantra is free software: you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by |
9 | * it under the terms of the GNU General Public License as published by |
… | |
… | |
197 | |
197 | |
198 | if (castnow) |
198 | if (castnow) |
199 | cast_spell (op, op, op->facing, spob, cp); |
199 | cast_spell (op, op, op->facing, spob, cp); |
200 | else |
200 | else |
201 | { |
201 | { |
|
|
202 | if (op->contr->ranged_ob) LOG (llevError, "%s", op->contr->ranged_ob->debug_desc ());//D |
202 | if (op->contr->ranged_ob) |
203 | if (op->contr->ranged_ob) |
203 | if (op->contr->ranged_ob->flag [FLAG_APPLIED]) |
204 | if (op->contr->ranged_ob->flag [FLAG_APPLIED]) |
204 | apply_special (op, op->contr->ranged_ob, AP_UNAPPLY); |
205 | apply_special (op, op->contr->ranged_ob, AP_UNAPPLY); |
205 | else |
206 | else |
206 | op->contr->ranged_ob = 0; |
207 | op->contr->ranged_ob = 0; |
207 | |
208 | |
|
|
209 | if (op->contr->ranged_ob) LOG (llevError, "%s", op->contr->ranged_ob->debug_desc ());//D |
|
|
210 | |
208 | if (op->contr->ranged_ob) |
211 | if (op->contr->ranged_ob) |
209 | op->failmsg (format ("You have to unapply the %s first to ready a spell.", &op->contr->ranged_ob->name)); |
212 | op->failmsg (format ("You have to unapply the %s first to ready a spell.", &op->contr->ranged_ob->name)); |
210 | else |
213 | else |
211 | { |
214 | { |
212 | op->change_weapon (op->contr->ranged_ob = spob); |
215 | op->change_weapon (op->contr->ranged_ob = spob); |