- 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://svn.code.sf.net/p/rathena/svn/trunk@9026 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-10-20 14:30:28 +00:00
parent eeb8324eb2
commit 8c699742a8
8 changed files with 51 additions and 11 deletions

View File

@ -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

View File

@ -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]

View File

@ -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

View File

@ -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;

View File

@ -104,6 +104,7 @@ extern struct Battle_Config {
unsigned short defnotenemy;
unsigned short vs_traps_bctall;
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;

View File

@ -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) {

View File

@ -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);

View File

@ -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;