summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-21 13:53:36 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-21 13:53:36 +0000
commit6a71c68fd365d0b7e91fe89a2d02296ef465a720 (patch)
tree8f9cc4485e78f23207e3edab3751d8bfe316b66c
parent5834376714bc7f39480eae14b9eb8e15f117d634 (diff)
downloadhercules-6a71c68fd365d0b7e91fe89a2d02296ef465a720.tar.gz
hercules-6a71c68fd365d0b7e91fe89a2d02296ef465a720.tar.bz2
hercules-6a71c68fd365d0b7e91fe89a2d02296ef465a720.tar.xz
hercules-6a71c68fd365d0b7e91fe89a2d02296ef465a720.zip
- Vending is now cancelled on a pc_setpos
- Pressure again ignores Basilica. - Fixed attacker's sc being nulled when the target's sc is empty. - Slaves now do a battle_check_target to check if the new target is an enemy when acquired through sd->skilltarget. - Fixed SC_SKE halving defense2 twice. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5355 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt8
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/mob.c5
-rw-r--r--src/map/pc.c2
-rw-r--r--src/map/status.c26
5 files changed, 27 insertions, 16 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 16a9b0c07..57d918aa7 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,14 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EVERYTHING ELSE
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
+2006/02/21
+ * Vending is now cancelled on a pc_setpos [Skotlex]
+ * Pressure again ignores Basilica. [Skotlex]
+ * Fixed attacker's sc being nulled when the target's sc is empty (fixes
+ most status changes not taking effect during battle) [Skotlex]
+ * Slaves now do a battle_check_target to check if the new target is an
+ enemy when acquired through the master's skilltarget. [Skotlex]
+ * Fixed SC_SKE halving de2 twice. [Skotlex]
2006/02/20
* The Super Novice Explosion Spirits skill will now trigger when the last
sentence is said (not after the next sentence as it was currently) [Skotlex]
diff --git a/src/map/battle.c b/src/map/battle.c
index 78cb1bb15..d7c97e284 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1111,7 +1111,7 @@ static struct Damage battle_calc_weapon_attack(
if (sc && !sc->count)
sc = NULL; //Skip checking as there are no status changes active.
if (tsc && !tsc->count)
- sc = NULL; //Skip checking as there are no status changes active.
+ tsc = NULL; //Skip checking as there are no status changes active.
switch (src->type)
{
diff --git a/src/map/mob.c b/src/map/mob.c
index db752c556..93198ddb4 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1469,8 +1469,11 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick)
struct block_list *tbl = NULL;
if(msd->attacktarget)
tbl = map_id2bl(msd->attacktarget);
- else if (msd->skilltarget)
+ else if (msd->skilltarget) {
tbl = map_id2bl(msd->skilltarget);
+ if (tbl && battle_check_target(&md->bl, tbl, BCT_ENEMY) <= 0)
+ tbl = NULL; //Required check as skilltarget is not always an enemy. [Skotlex]
+ }
if(tbl && status_check_skilluse(&md->bl, tbl, 0, 0)) {
md->target_id=tbl->id;
md->state.targettype = ATTACKABLE;
diff --git a/src/map/pc.c b/src/map/pc.c
index b8bea9740..6f015c0b9 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3189,6 +3189,8 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
chat_leavechat(sd);
if(sd->trade_partner) // 取引を中?する
trade_tradecancel(sd);
+ if(sd->vender_id)
+ vending_closevending(sd);
if(sd->state.storage_flag == 1)
storage_storage_quit(sd,0); // 倉庫を開いてるなら保存する
else if (sd->state.storage_flag == 2)
diff --git a/src/map/status.c b/src/map/status.c
index 4b6fade9b..845f0a84d 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -347,18 +347,6 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
if (!skill_num && !(mode&MD_CANATTACK))
return 0; //This mode is only needed for melee attacking.
-
- if (((src && map_getcell(src->m,src->x,src->y,CELL_CHKBASILICA)) ||
- (target && target != src && map_getcell(target->m,target->x,target->y,CELL_CHKBASILICA)))
- && !(mode&MD_BOSS))
- { //Basilica Check
- if (!skill_num) return 0;
- race = skill_get_inf(skill_num);
- if (race&INF_ATTACK_SKILL)
- return 0;
- if (race&INF_GROUND_SKILL && skill_get_unit_target(skill_num)&BCT_ENEMY)
- return 0;
- }
if (skill_num == PA_PRESSURE && flag) {
//Gloria Avoids pretty much everythng....
@@ -372,6 +360,18 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
return 1;
}
+ if (((src && map_getcell(src->m,src->x,src->y,CELL_CHKBASILICA)) ||
+ (target && target != src && map_getcell(target->m,target->x,target->y,CELL_CHKBASILICA)))
+ && !(mode&MD_BOSS))
+ { //Basilica Check
+ if (!skill_num) return 0;
+ race = skill_get_inf(skill_num);
+ if (race&INF_ATTACK_SKILL)
+ return 0;
+ if (race&INF_GROUND_SKILL && skill_get_unit_target(skill_num)&BCT_ENEMY)
+ return 0;
+ }
+
if (src) sc = status_get_sc(src);
if(sc && sc->opt1 >0)
@@ -2058,8 +2058,6 @@ int status_calc_def2(struct block_list *bl, int def2)
def2 -= def2 * 50/100;
if(sc->data[SC_PROVOKE].timer!=-1)
def2 -= def2 * (5+5*sc->data[SC_PROVOKE].val1)/100;
- if(sc->data[SC_SKE].timer!=-1)
- def2 /= 2;
if(sc->data[SC_JOINTBEAT].timer!=-1){
if(sc->data[SC_JOINTBEAT].val2==3)
def2 -= def2 * 50/100;