summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/pc.c5
-rw-r--r--src/map/skill.c22
-rw-r--r--src/map/status.c4
-rw-r--r--src/map/unit.c1
4 files changed, 15 insertions, 17 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index d79ca7319..5ce2a8394 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2603,10 +2603,11 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount)
if (i >= MAX_INVENTORY){
i = pc_search_inventory(sd,0);
if(i<0) return 4;
+ memcpy(&sd->status.inventory[i], item_data, sizeof(sd->status.inventory[0]));
// clear equips field first, just in case
if (item_data->equip)
- item_data->equip = 0;
- memcpy(&sd->status.inventory[i], item_data, sizeof(sd->status.inventory[0]));
+ sd->status.inventory[i].equip = 0;
+
sd->status.inventory[i].amount = amount;
sd->inventory_data[i] = data;
clif_additem(sd,i,amount,0);
diff --git a/src/map/skill.c b/src/map/skill.c
index 8b3576e94..164a6c7c2 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -6242,6 +6242,15 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid,
unit_flag = skill_get_unit_flag(skillid);
layout = skill_get_unit_layout(skillid,skilllv,src,x,y);
+ if (skillid == AL_WARP && flag && src->type == BL_SKILL)
+ { //Warp Portal morphing to active mode, extract relevant data from src. [Skotlex]
+ group= ((TBL_SKILL*)src)->group;
+ src = map_id2bl(group->src_id);
+ if (!src) return NULL;
+ val2=group->val2; //Copy the (x,y) position you warp to
+ val3=group->val3; //as well as the mapindex to warp to.
+ }
+
BL_CAST(BL_PC, src, sd);
status = status_get_status_data(src);
sc= status_get_sc(src); // for traps, firewall and fogwall - celest
@@ -6263,7 +6272,6 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid,
val1=skilllv+6;
if(!(flag&1))
limit=2000;
- active_flag=0;
break;
case PR_SANCTUARY: /* サンクチュアリ */
@@ -7259,16 +7267,8 @@ int skill_unit_onlimit (struct skill_unit *src, unsigned int tick)
nullpo_retr(0, sg=src->group);
switch(sg->unit_id){
- case UNT_WARP_ACTIVE: /* ワープポータル(発動前) */
- {
- struct skill_unit_group *group=
- skill_unitsetting(map_id2bl(sg->src_id),sg->skill_id,sg->skill_lv,
- src->bl.x,src->bl.y,1);
- if(group == NULL)
- return 0;
- group->val2=sg->val2; //Copy the (x,y) position you warp to
- group->val3=sg->val3; //as well as the mapindex to warp to.
- }
+ case UNT_WARP_ACTIVE:
+ skill_unitsetting(&src->bl,sg->skill_id,sg->skill_lv,src->bl.x,src->bl.y,1);
break;
case UNT_ICEWALL: /* アイスウォール */
diff --git a/src/map/status.c b/src/map/status.c
index daa6a17d4..bb928def5 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1744,9 +1744,7 @@ int status_calc_pc(struct map_session_data* sd,int first)
if(sd->equip_index[EQI_AMMO] >= 0){ //
index = sd->equip_index[EQI_AMMO];
- //FIXME: The equip check is a temporary measure until a speed exploit
- // that has yet to be fixed!
- if(sd->inventory_data[index] && sd->status.inventory[index].equip&EQP_AMMO){ // Arrows
+ if(sd->inventory_data[index]){ // Arrows
sd->state.lr_flag = 2;
run_script(sd->inventory_data[index]->script,0,sd->bl.id,0);
sd->state.lr_flag = 0;
diff --git a/src/map/unit.c b/src/map/unit.c
index 5586db0b2..57a557395 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1524,7 +1524,6 @@ int unit_remove_map(struct block_list *bl, int clrtype) {
if(sd->guild_alliance>0)
guild_reply_reqalliance(sd,sd->guild_alliance_account,0);
- pc_stop_following(sd);
pc_delinvincibletimer(sd);
if(sd->pvp_timer!=-1) {