|
From: <cro...@li...> - 2002-12-13 05:09:51
|
Module Name: crossfire
Committed By: garbled
Date: Fri Dec 13 05:09:49 UTC 2002
Modified Files:
crossfire/server: gods.c player.c time.c
Log Message:
Fix a typo in the attacktype bow->arrow transfer. Make it so gods can
now bless bows like they would any other weapon. Make slaying transfer
fom the bow to the arrow, so the god enchantment is not lost.
Start of context diffs
Index: crossfire/server/gods.c
diff -c crossfire/server/gods.c:1.34 crossfire/server/gods.c:1.35
*** crossfire/server/gods.c:1.34 Tue Nov 26 00:48:20 2002
--- crossfire/server/gods.c Thu Dec 12 21:09:49 2002
***************
*** 1,6 ****
/*
* static char *rcsid_gods_c =
! * "$Id: gods.c,v 1.34 2002/11/26 08:48:20 garbled Exp $";
*/
/*
--- 1,6 ----
/*
* static char *rcsid_gods_c =
! * "$Id: gods.c,v 1.35 2002/12/13 05:09:49 garbled Exp $";
*/
/*
***************
*** 542,548 ****
int tmp;
for (weapon = op->inv; weapon; weapon = weapon->below)
! if (weapon->type == WEAPON && QUERY_FLAG (weapon, FLAG_APPLIED))
break;
if (weapon == NULL || god_examines_item (god, weapon) <= 0)
return 0;
--- 542,549 ----
int tmp;
for (weapon = op->inv; weapon; weapon = weapon->below)
! if ((weapon->type == WEAPON || weapon->type == BOW)
! && QUERY_FLAG (weapon, FLAG_APPLIED))
break;
if (weapon == NULL || god_examines_item (god, weapon) <= 0)
return 0;
Index: crossfire/server/player.c
diff -c crossfire/server/player.c:1.109 crossfire/server/player.c:1.110
*** crossfire/server/player.c:1.109 Thu Dec 12 13:52:52 2002
--- crossfire/server/player.c Thu Dec 12 21:09:49 2002
***************
*** 1,6 ****
/*
* static char *rcsid_player_c =
! * "$Id: player.c,v 1.109 2002/12/12 21:52:52 garbled Exp $";
*/
/*
--- 1,6 ----
/*
* static char *rcsid_player_c =
! * "$Id: player.c,v 1.110 2002/12/13 05:09:49 garbled Exp $";
*/
/*
***************
*** 1361,1367 ****
SET_ANIMATION(arrow,dir);
arrow->stats.sp = arrow->stats.wc; /* save original wc and dam */
arrow->stats.hp = arrow->stats.dam;
! arrow->attacktype = arrow->stats.grace;
/* Note that this was different for monsters - they got their level
* added to the damage. I think the strength bonus is more proper.
*/
--- 1361,1369 ----
SET_ANIMATION(arrow,dir);
arrow->stats.sp = arrow->stats.wc; /* save original wc and dam */
arrow->stats.hp = arrow->stats.dam;
! arrow->stats.grace = arrow->attacktype;
! if (arrow->slaying != NULL)
! arrow->spellarg = strdup(arrow->slaying);
/* Note that this was different for monsters - they got their level
* added to the damage. I think the strength bonus is more proper.
*/
***************
*** 1375,1385 ****
--- 1377,1391 ----
bow->stats.wc;
arrow->level = SK_level (op);
arrow->attacktype |= bow->attacktype;
+ if (bow->slaying != NULL)
+ arrow->slaying = strdup(bow->slaying);
} else {
arrow->stats.wc= op->stats.wc - bow->magic - arrow->magic -
arrow->stats.wc;
arrow->level = op->level;
arrow->attacktype |= bow->attacktype;
+ if (bow->slaying != NULL)
+ arrow->slaying = strdup(bow->slaying);
}
arrow->map = op->map;
Index: crossfire/server/time.c
diff -c crossfire/server/time.c:1.45 crossfire/server/time.c:1.46
*** crossfire/server/time.c:1.45 Thu Dec 12 13:52:52 2002
--- crossfire/server/time.c Thu Dec 12 21:09:49 2002
***************
*** 1,6 ****
/*
* static char *rcsid_time_c =
! * "$Id: time.c,v 1.45 2002/12/12 21:52:52 garbled Exp $";
*/
/*
--- 1,6 ----
/*
* static char *rcsid_time_c =
! * "$Id: time.c,v 1.46 2002/12/13 05:09:49 garbled Exp $";
*/
/*
***************
*** 535,544 ****
--- 535,553 ----
op->stats.wc = op->stats.sp;
op->stats.dam= op->stats.hp;
op->attacktype = op->stats.grace;
+ if (op->slaying != NULL)
+ free(op->slaying);
+ if (op->spellarg != NULL) {
+ op->slaying = strdup(op->spellarg);
+ free(op->spellarg);
+ } else
+ op->slaying = NULL;
/* Reset these to zero, so that CAN_MERGE will work properly */
+ op->spellarg = NULL;
op->stats.sp = 0;
op->stats.hp = 0;
op->stats.grace = 0;
+ op->level = 0;
op->face=op->arch->clone.face;
op->owner=NULL; /* So that stopped arrows will be saved */
update_object (op,UP_OBJ_FACE);
|