Ver código fonte

- Now arrow-consuming skills where your main weapon is a whip or musical instrument WILL count as arrow-type attacks, using the atk of the arrow and all related bonuses.
- Fixed some homun timer initialization code.
- Some cleanups on the pet.c code, but no idea if pet view will work correctly now.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8315 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex 19 anos atrás
pai
commit
4e32d21c17
5 arquivos alterados com 13 adições e 13 exclusões
  1. 5 0
      Changelog-Trunk.txt
  2. 2 0
      src/map/battle.c
  3. 2 9
      src/map/mercenary.c
  4. 3 3
      src/map/pet.c
  5. 1 1
      src/map/skill.c

+ 5 - 0
Changelog-Trunk.txt

@@ -3,6 +3,11 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
+2006/08/16
+	* Now arrow-consuming skills where your main weapon is a whip or musical
+	  instrument WILL count as arrow-type attacks, using the atk of the arrow and
+	  all related bonuses. [Skotlex]
+	* Fixed some homun timer initialization code. [Skotlex]
 2006/08/15
 	* Applied multiple fixes which should take care of making homun save/load
 	  work on TXT now. [Skotlex]

+ 2 - 0
src/map/battle.c

@@ -1213,6 +1213,8 @@ static struct Damage battle_calc_weapon_attack(
 				case W_SHOTGUN:
 				case W_GATLING:
 				case W_GRENADE:
+				case W_WHIP:	//These two do use arrow based skills.
+				case W_MUSICAL:
 				  break;
 				default:
 				  i |= 16; // for ex. shuriken must not be influenced by DEX

+ 2 - 9
src/map/mercenary.c

@@ -778,14 +778,6 @@ int merc_hom_create(struct map_session_data *sd)
 	hd->bl.prev=NULL;
 	hd->bl.next=NULL;
 	hd->exp_next=hexptbl[hd->master->homunculus.level - 1];
-	hd->ud.attacktimer=-1;
-	hd->ud.attackabletime=gettick();
-	hd->target_id = 0 ;
-
-	for(i=0;i<MAX_STATUSCHANGE;i++) {
-		hd->sc.data[i].timer=-1;
-		hd->sc.data[i].val1 = hd->sc.data[i].val2 = hd->sc.data[i].val3 = hd->sc.data[i].val4 = 0;
-	}
 
 	hd->base_status.hp = hd->master->homunculus.hp ;
 	hd->base_status.max_hp = hd->master->homunculus.max_hp ;
@@ -802,13 +794,14 @@ int merc_hom_create(struct map_session_data *sd)
 
 	status_set_viewdata(&hd->bl, hd->master->homunculus.class_);
 	status_change_init(&hd->bl);
-	hd->ud.dir = sd->ud.dir;
 	unit_dataset(&hd->bl);
+	hd->ud.dir = sd->ud.dir;
 	
 	map_addiddb(&hd->bl);
 	status_calc_homunculus(hd,1);
 
 	// Timers
+	hd->hungry_timer = hd->natural_heal_timer = -1;
 	merc_hom_init_timers(hd);
 	return 0;
 }

+ 3 - 3
src/map/pet.c

@@ -402,7 +402,7 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *pet)
 	}
 	sd->pd = pd = (struct pet_data *)aCalloc(1,sizeof(struct pet_data));
 	pd->petDB = &pet_db[i];
-	memcpy(&pd->pet, pet, sizeof(pet));
+	memcpy(&pd->pet, pet, sizeof(struct s_pet));
 	pd->bl.m = sd->bl.m;
 	pd->bl.x = sd->bl.x;
 	pd->bl.y = sd->bl.y;
@@ -737,7 +737,7 @@ int pet_equipitem(struct map_session_data *sd,int index)
 
 	pc_delitem(sd,index,1,0);
 	pd->pet.equip = nameid;
-	status_set_viewdata(&pd->bl, pd->vd.class_); //Updates view_data.
+	status_set_viewdata(&pd->bl, pd->pet.class_); //Updates view_data.
 	clif_pet_equip(pd);
 	if (battle_config.pet_equip_required)
 	{ 	//Skotlex: start support timers if need
@@ -766,7 +766,7 @@ static int pet_unequipitem(struct map_session_data *sd, struct pet_data *pd)
 
 	nameid = pd->pet.equip;
 	pd->pet.equip = 0;
-	status_set_viewdata(&pd->bl, pd->vd.class_);
+	status_set_viewdata(&pd->bl, pd->pet.class_);
 	clif_pet_equip(pd);
 	memset(&tmp_item,0,sizeof(tmp_item));
 	tmp_item.nameid = nameid;

+ 1 - 1
src/map/skill.c

@@ -7448,7 +7448,7 @@ int skill_unit_effect (struct block_list *bl, va_list ap)
 {
 	struct skill_unit *unit;
 	struct skill_unit_group *group;
-	int flag,unit_id,skill_id;
+	int flag,unit_id=0,skill_id;
 	unsigned int tick;
 
 	unit=va_arg(ap,struct skill_unit*);