diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-10-20 14:30:28 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-10-20 14:30:28 +0000 |
commit | aea859ec676e23f32f7dee151b2db91c92680afd (patch) | |
tree | 513e3972de57acb6c7ac91463618ae7118fa0d71 | |
parent | 5173b7e5d42654313a52c8980f84cf424417bd50 (diff) | |
download | hercules-aea859ec676e23f32f7dee151b2db91c92680afd.tar.gz hercules-aea859ec676e23f32f7dee151b2db91c92680afd.tar.bz2 hercules-aea859ec676e23f32f7dee151b2db91c92680afd.tar.xz hercules-aea859ec676e23f32f7dee151b2db91c92680afd.zip |
- Added config setting "summon_flora_setting", which it you can decide now two things: a. Whether or not players can harm your floras outside versus grounds, and b. Whether or not you can summon out and mix different types of plants at the same time.
- Likely fixed pc_steal_item always failing to steal (it was attempting to steal random item IDs...)
- Cleaned up a bit the mob on-death event so that when the killer is a homunculus, it's master will be taken. Also, the variable killerrid will be set before running the script to specify who delivered the final blow. If the killerrid matches with the script attached player, you can be sure your player did the final blow to the mob, otherwise, the attached player is who did the most damage to the mob.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9026 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 13 | ||||
-rw-r--r-- | conf-tmpl/Changelog.txt | 5 | ||||
-rw-r--r-- | conf-tmpl/battle/skill.conf | 7 | ||||
-rw-r--r-- | src/map/battle.c | 7 | ||||
-rw-r--r-- | src/map/battle.h | 3 | ||||
-rw-r--r-- | src/map/mob.c | 23 | ||||
-rw-r--r-- | src/map/pc.c | 1 | ||||
-rw-r--r-- | src/map/skill.c | 3 |
8 files changed, 51 insertions, 11 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 6f38105a0..92a377dfc 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,6 +3,19 @@ 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/10/20
+ * Added config setting "summon_flora_setting", which it you can decide now
+ two things: a. Whether or not players can harm your floras outside versus
+ grounds, and b. Whether or not you can summon out and mix different types
+ of plants at the same time. [Skotlex]
+ * Likely fixed pc_steal_item always failing to steal (it was attempting to
+ steal random item IDs...) [Skotlex]
+ * Cleaned up a bit the mob on-death event so that when the killer is a
+ homunculus, it's master will be taken. Also, the variable killerrid will be
+ set before running the script to specify who delivered the final blow. If
+ the killerrid matches with the script attached player, you can be sure your
+ player did the final blow to the mob, otherwise, the attached player is who
+ did the most damage to the mob. [Skotlex]
2006/10/19
* Cleaned up the log.c file. [Skotlex]
* Fixed log_chat not recording anything if the server is compiled in SQL
diff --git a/conf-tmpl/Changelog.txt b/conf-tmpl/Changelog.txt index f927a624f..4cb9f338c 100644 --- a/conf-tmpl/Changelog.txt +++ b/conf-tmpl/Changelog.txt @@ -1,5 +1,10 @@ Date Added
+2006/10/20
+ * Added config setting "summon_flora_setting" (skill.conf), with it you can
+ decide now two things: a. Whether or not players can harm your floras
+ outside versus grounds, and b. Whether or not you can summon out and mix
+ different types of plants at the same time. [Skotlex]
2006/10/19
* Commented out the monster_noteleport mapflag from the guild castles as
this is the Aegis behaviour [Skotlex]
diff --git a/conf-tmpl/battle/skill.conf b/conf-tmpl/battle/skill.conf index a90338ca2..4455f5f86 100644 --- a/conf-tmpl/battle/skill.conf +++ b/conf-tmpl/battle/skill.conf @@ -130,6 +130,13 @@ gvg_traps_target_all: 1 // (Invisible traps can be revealed through Hunter's Detecting skill)
traps_setting: 0
+// Restrictions applied to the Alchemist's Summon Flora skill (add as necessary)
+// 1: Enable players to damage the floras outside of versus grounds.
+// 3: Disable having different types out at the same time
+// (eg: forbid summoning anything except hydras when there's already
+// one hydra out)
+summon_flora_setting: 3
+
// Whether placed down skills will check walls (Note 1)
// (Makes it so that Storm Gust/Lord of Vermillion/etc when casted next to a wall, won't hit on the other side)
skill_wall_check: yes
diff --git a/src/map/battle.c b/src/map/battle.c index d0eab1861..da209b2a1 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3169,9 +3169,10 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f return -1; //Cannot be targeted yet. break; case BL_MOB: - if (((TBL_MOB*)target)->special_state.ai > 1 && + if((((TBL_MOB*)target)->special_state.ai == 2 || //Marine Spheres + (((TBL_MOB*)target)->special_state.ai == 3 && battle_config.summon_flora&1)) && //Floras s_bl->type == BL_PC && src->type != BL_MOB) - { //Alchemist summoned mobs are always targettable by players + { //Targettable by players state |= BCT_ENEMY; strip_enemy = 0; } @@ -3474,6 +3475,7 @@ static const struct battle_data_short { { "defunit_not_enemy", &battle_config.defnotenemy }, { "gvg_traps_target_all", &battle_config.vs_traps_bctall }, { "traps_setting", &battle_config.traps_setting }, + { "summon_flora_setting", &battle_config.summon_flora }, { "clear_skills_on_death", &battle_config.clear_unit_ondeath }, { "clear_skills_on_warp", &battle_config.clear_unit_onwarp }, { "random_monster_checklv", &battle_config.random_monster_checklv }, @@ -3872,6 +3874,7 @@ void battle_set_defaults() { battle_config.defnotenemy=0; battle_config.vs_traps_bctall=BL_PC; battle_config.traps_setting=0; + battle_config.summon_flora=3; battle_config.clear_unit_ondeath=BL_ALL; battle_config.clear_unit_onwarp=BL_ALL; battle_config.random_monster_checklv=1; diff --git a/src/map/battle.h b/src/map/battle.h index 364553ebd..181f39340 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -103,7 +103,8 @@ extern struct Battle_Config { unsigned short pc_damage_delay_rate;
unsigned short defnotenemy;
unsigned short vs_traps_bctall;
- unsigned short traps_setting;
+ unsigned short traps_setting;
+ unsigned short summon_flora; //[Skotlex]
unsigned short clear_unit_ondeath; //[Skotlex]
unsigned short clear_unit_onwarp; //[Skotlex]
unsigned short random_monster_checklv;
diff --git a/src/map/mob.c b/src/map/mob.c index fa0d0f135..e8d2a5b81 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2134,17 +2134,26 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) mob_script_callback(md, src, CALLBACK_DEAD); else if(md->npc_event[0]){ md->status.hp = 0; //So that npc_event invoked functions KNOW that I am dead. - if(src && src->type == BL_PET) - sd = ((struct pet_data *)src)->msd; - if(sd && battle_config.mob_npc_event_type) + if(src) + switch (src->type) { + case BL_PET: + sd = ((TBL_PET*)src)->msd; + break; + case BL_HOM: + sd = ((TBL_HOM*)src)->master; + break; + } + if(sd && battle_config.mob_npc_event_type) { + pc_setglobalreg(sd,"killerrid",sd->bl.id); npc_event(sd,md->npc_event,0); - else if(mvp_sd) + } else if(mvp_sd) { + pc_setglobalreg(mvp_sd,"killerrid",sd?sd->bl.id:0); npc_event(mvp_sd,md->npc_event,0); + } md->status.hp = 1; - } else if (mvp_sd) { //lordalfa + } else if (mvp_sd && mvp_sd->state.event_kill_mob) { //lordalfa pc_setglobalreg(mvp_sd,"killedrid",md->class_); - if(mvp_sd->state.event_kill_mob) - npc_script_event(mvp_sd, NPCE_KILLNPC); // PCKillNPC [Lance] + npc_script_event(mvp_sd, NPCE_KILLNPC); // PCKillNPC [Lance] } if(md->deletetimer!=-1) { diff --git a/src/map/pc.c b/src/map/pc.c index f83b032cf..ee003a66a 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3236,6 +3236,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, int lv) md->state.steal_flag = UCHAR_MAX; //you can't steal from this mob any more malloc_set(&tmp_item,0,sizeof(tmp_item)); + itemid = md->db->dropitem[i].nameid; tmp_item.nameid = itemid; tmp_item.amount = 1; tmp_item.identify = itemdb_isidentified(itemid); diff --git a/src/map/skill.c b/src/map/skill.c index 84c174788..b3c87ddaf 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -8137,7 +8137,8 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t int mob_class = (skill==AM_CANNIBALIZE)? summons[lv-1] :1142; if(battle_config.land_skill_limit && maxcount>0 && (battle_config.land_skill_limit&BL_PC)) { i = map_foreachinmap(skill_check_condition_mob_master_sub ,sd->bl.m, BL_MOB, sd->bl.id, mob_class, skill, &c); - if(c >= maxcount || (skill==AM_CANNIBALIZE && c != i)) + if(c >= maxcount || + (skill==AM_CANNIBALIZE && c != i && battle_config.summon_flora&2)) { //Fails when: exceed max limit. There are other plant types already out. clif_skill_fail(sd,skill,0,0); return 0; |