- Fixed Overthrust's timer not being able to be refreshed when recasting it (conflict on what val2 should mean)

- Changed the code in status_change_timer so that a null pointer no longer causes a crash but prints an error instead.
- Corrected clones not copying over a player's skills properly.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12027 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2008-01-06 23:48:13 +00:00
parent 67cb0da56c
commit 38dd2f2fde
5 changed files with 18 additions and 8 deletions

View File

@ -3,6 +3,10 @@ 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.
2008/01/07
* Changed the code in status_change_timer so that a null pointer no longer
causes a crash but prints an error instead.
* Corrected clones not copying over a player's skills properly. [Skotlex]
2008/01/06
* Extended the id range for npcs, now [400,700) will also be treated
as NPC objects (see topic:170845 and bugreport:727) [ultramage]

View File

@ -1262,7 +1262,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
if(sc && skill_num != PA_SACRIFICE)
{
if(sc->data[SC_OVERTHRUST])
skillratio += sc->data[SC_OVERTHRUST]->val2;
skillratio += sc->data[SC_OVERTHRUST]->val3;
if(sc->data[SC_MAXOVERTHRUST])
skillratio += sc->data[SC_MAXOVERTHRUST]->val2;
if(sc->data[SC_BERSERK])

View File

@ -2976,7 +2976,7 @@ int mob_clone_spawn(struct map_session_data *sd, int m, int x, int y, const char
ms = &db->skill[0];
//Go Backwards to give better priority to advanced skills.
for (i=0,j = MAX_SKILL_TREE-1;j>=0 && i< MAX_MOBSKILL ;j--) {
skill_id = skill_tree[sd->status.class_][j].id;
skill_id = skill_tree[pc_class2idx(sd->status.class_)][j].id;
if (!skill_id || sd->status.skill[skill_id].lv < 1 ||
(skill_get_inf2(skill_id)&(INF2_WEDDING_SKILL|INF2_GUILD_SKILL)) ||
skill_get_nocast(skill_id)&16

View File

@ -3657,7 +3657,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case BS_OVERTHRUST:
if (sd == NULL || sd->status.party_id == 0 || (flag & 1)) {
clif_skill_nodamage(bl,bl,skillid,skilllv,
sc_start4(bl,type,100,skilllv,(src == bl)? 1:0,0,0,skill_get_time(skillid,skilllv)));
sc_start2(bl,type,100,skilllv,(src == bl)? 1:0,skill_get_time(skillid,skilllv)));
} else if (sd) {
party_foreachsamemap(skill_area_sub,
sd,skill_get_splash(skillid, skilllv),

View File

@ -4925,7 +4925,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_ADRENALINE2:
case SC_WEAPONPERFECTION:
case SC_OVERTHRUST:
if (sce->val1 > val1)
if (sce->val2 > val2)
return 0;
break;
case SC_HPREGEN:
@ -5686,7 +5686,8 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
val2 = 20*val1; //Power increase
break;
case SC_OVERTHRUST:
val2 = 5*val1; //Power increase
//val2 holds if it was casted on self, or is bonus received from others
val3 = 5*val1; //Power increase
if(sd && pc_checkskill(sd,BS_HILTBINDING)>0)
tick += tick / 10;
break;
@ -6662,12 +6663,17 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
struct status_change_entry *sce;
bl = map_id2bl(id);
sc = bl?status_get_sc(bl):NULL;
if(!bl)
{
ShowDebug("status_change_timer: Null pointer id: %d data: %d\n", id, data);
return 0;
}
sc = status_get_sc(bl);
status = status_get_status_data(bl);
if(!(bl && sc && (sce = sc->data[type])))
if(!(sc && (sce = sc->data[type])))
{
ShowDebug("status_change_timer: Null pointer id: %d data: %d bl-type: %d\n", id, data, bl?bl->type:-1);
ShowDebug("status_change_timer: Null pointer id: %d data: %d bl-type: %d\n", id, data, bl->type);
return 0;
}