From aea859ec676e23f32f7dee151b2db91c92680afd Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 20 Oct 2006 14:30:28 +0000 Subject: - 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 --- src/map/battle.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/map/battle.c') 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; -- cgit v1.2.3-70-g09d2