summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-13 19:53:10 +0000
committer(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-13 19:53:10 +0000
commit61980833a1b7ffe229712f782f14425ab4fef90e (patch)
tree20eb8796273fc7c6c8794fb4d6caee8d552314b6
parent40fc56ca294bbc0ec69831f2f41201616e838405 (diff)
downloadhercules-61980833a1b7ffe229712f782f14425ab4fef90e.tar.gz
hercules-61980833a1b7ffe229712f782f14425ab4fef90e.tar.bz2
hercules-61980833a1b7ffe229712f782f14425ab4fef90e.tar.xz
hercules-61980833a1b7ffe229712f782f14425ab4fef90e.zip
autoloot, poison spore and more on the unknown skill [Shinomori]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1105 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-SVN.txt3
-rw-r--r--src/map/mob.c2
-rw-r--r--src/map/pet.c21
-rw-r--r--src/map/skill.c28
4 files changed, 39 insertions, 15 deletions
diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt
index 374049a61..d639683fb 100644
--- a/Changelog-SVN.txt
+++ b/Changelog-SVN.txt
@@ -1,6 +1,9 @@
Date Added
02/13
+ * added an @autoloot switch that Upa-kun has forgotten [Shinomori]
+ * changed pet_skillattack_timer and corrected the poison spore attack
+ * tighter check's on "unknown skill" error; but added prints to trace it
* Added Wallex's changes to only evoke script_rid2sd if agitcheck(1) is used
[celest]
* Merged jA's equipment breaking system into the current one, and corrected
diff --git a/src/map/mob.c b/src/map/mob.c
index 3c70998bf..f0a3edd63 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2049,7 +2049,7 @@ static int mob_delay_item_drop2(int tid,unsigned int tick,int id,int data)
}
} else
#endif
- if(battle_config.item_auto_get){
+ if(battle_config.item_auto_get || ditem->first_sd->autoloot){//Autoloot added by Upa-Kun
drop_flag = 0;
if((flag = pc_additem(ditem->first_sd,&ditem->item_data,ditem->item_data.amount))){
clif_additem(ditem->first_sd,0,0,flag);
diff --git a/src/map/pet.c b/src/map/pet.c
index c50e76087..b4dddc372 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -1577,19 +1577,22 @@ int pet_skillattack_timer(int tid,unsigned int tick,int id,int data)
}
if(md && rand()%100 < sd->pet.intimate*pd->skilltimer/100 ) {
- if(pd->skilltype==6 || pd->skilltype==176) {
+ switch(pd->skilltype)
+ {
+ case SM_PROVOKE:
+ //case NPC_POISON: poison is not handled there
skill_castend_nodamage_id(&pd->bl,&md->bl,pd->skilltype,pd->skillval,tick,0);
- }
-
- else if(pd->skilltype==110){
+ break;
+ case BS_HAMMERFALL:
skill_castend_pos2(&pd->bl,md->bl.x,md->bl.y,pd->skilltype,pd->skillval,tick,0);
- }
-
- else if(pd->skilltype==91) {
+ break;
+ case WZ_HEAVENDRIVE:
skill_castend_pos2(&pd->bl,md->bl.x,md->bl.y,pd->skilltype,pd->skillval+rand()%100,tick,0);
- }
- else
+ break;
+ default:
skill_castend_damage_id(&pd->bl,&md->bl,pd->skilltype,pd->skillval,tick,0);
+ break;
+ }
pd->skillbonustimer=add_timer(gettick()+1000,pet_skillattack_timer,sd->bl.id,0);
return 0;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 803d8f9fc..0206777cb 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -811,9 +811,12 @@ int skill_count_target(struct block_list *bl, va_list ap );
// [MouseJstr] - skill ok to cast? and when?
int skillnotok(int skillid, struct map_session_data *sd) {
+
if (sd == 0)
- return 0;
-
+ //return 0;
+ return 1;
+ // I think it was meant to be "no skills allowed when not a valid sd"
+
if (!(skillid >= 10000 && skillid < 10015))
if ((skillid > MAX_SKILL) || (skillid < 0))
return 1;
@@ -976,7 +979,12 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
nullpo_retr(0, src);
nullpo_retr(0, bl);
- //if(skilllv <= 0) return 0;
+ if(skillid < 0)
+ { // remove the debug print when this case is finished
+ printf("skill_additional_effect: skillid=%i\ncall: %p %p %i %i %i %i",skillid,
+ src, bl,skillid,skilllv,attack_type,tick);
+ return 0;
+ }
if(skillid > 0 && skilllv <= 0) return 0; // don't forget auto attacks! - celest
if (src->type == BL_PC){
@@ -2212,7 +2220,12 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
struct status_change *sc_data = status_get_sc_data(src);
int i;
- if(skillid < 0) return 0;
+ if(skillid < 0)
+ { // remove the debug print when this case is finished
+ printf("skill_castend_damage_id: skillid=%i\ncall: %p %p %i %i %i %i",skillid,
+ src, bl,skillid,skilllv,tick,flag);
+ return 0;
+ }
if(skillid > 0 && skilllv <= 0) return 0;
nullpo_retr(1, src);
@@ -2876,7 +2889,12 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
,1157,1159,1190,1272,1312,1373,1492};
int poringclass[]={1002};
- //if(skilllv <= 0) return 0;
+ if(skillid < 0)
+ { // remove the debug print when this case is finished
+ printf("skill_castend_damage_id: skillid=%i\ncall: %p %p %i %i %i %i",skillid,
+ src, bl,skillid,skilllv,tick,flag);
+ return 0;
+ }
if(skillid > 0 && skilllv <= 0) return 0; // celest
nullpo_retr(1, src);