diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-01 18:18:32 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-01 18:18:32 +0000 |
commit | 7564712d7fc9d13890011fdd22215e9ff912e1a4 (patch) | |
tree | 029e50b1c4a0f231a784b8aae076926043dfb17a /src/map/pc.c | |
parent | a6bc36f6d9a6bbf163554e9cf9523b43216c0c04 (diff) | |
download | hercules-7564712d7fc9d13890011fdd22215e9ff912e1a4.tar.gz hercules-7564712d7fc9d13890011fdd22215e9ff912e1a4.tar.bz2 hercules-7564712d7fc9d13890011fdd22215e9ff912e1a4.tar.xz hercules-7564712d7fc9d13890011fdd22215e9ff912e1a4.zip |
- Turn Undead and Offensive Resurrection should now work on undead players.
- Fixed the range checking of Repair weapon
- Rude attacked is now also triggered when you hit a target that can't move out of their melee attack range.
- Mob ai will attempt to do a long-range attacked condition skill before unlocking a target when it is attacked and said target is out of melee range of a non-walking mob.
- Corrected mobskill event to set the target_id before triggering.
- Moved MSC_SKILLUSED trigger to mobskill_event which is triggered in battle_calc_damage. It is also triggered on skill_castend_nodamage_id
- Added party_share_loot for handling party-share loot. it should now work with autoloot as well.
- Fixed skill_break_rate breaking stuff even if the rate is 0.
- pc_stopwalking will not send a fixpos packet if you are sitting.
- mob_can_reach rude-attacked condition now uses the mob's field of view.
- SC_NOCHAT is automatically started on pc_authok if manner is negative.
- Map server now refuses to start if you try to define a label with the same name as some const.txt defined character parameter.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5414 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 58 |
1 files changed, 6 insertions, 52 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index c0d8d0aa1..18b943965 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -845,6 +845,8 @@ int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_t clif_wis_message(sd->fd, wisp_server_name, tmpstr, strlen(tmpstr)+1);
}
+ if(sd->status.manner < 0) //Needed or manner will always be negative.
+ status_change_start(&sd->bl,SC_NOCHAT,100,0,0,0,0,0,0);
return 0;
}
@@ -2590,63 +2592,15 @@ int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem) }
first_sd = NULL; //First_sd will store who picked up the item.
if (p && p->item&2) { //item distribution to party members.
- first_sd = NULL;
- if (battle_config.party_share_type) { //Round Robin
- int i;
- i = p->itemc;
- do {
- i++;
- if (i >= MAX_PARTY)
- i = 0; // reset counter to 1st person in party so it'll stop when it reaches "itemc"
- if ((second_sd=p->member[i].sd)==NULL || sd->bl.m != second_sd->bl.m)
- continue;
-
- if (pc_additem(second_sd,&fitem->item_data,fitem->item_data.amount))
- continue; //Chosen char can't pick up loot.
- //Successful pick.
- first_sd = second_sd;
- break;
- } while (i != p->itemc);
- // Skip to the current receiver of an item, so the next pick should not go to him again.
- p->itemc = i;
- } else { //Random pick
- struct map_session_data*psd[MAX_PARTY];
- int i, count=0;
- //Collect pick candidates
- for (i = 0; i < MAX_PARTY; i++) {
- if ((psd[count]=p->member[i].sd) && psd[count]->bl.m == sd->bl.m)
- count++;
- }
- if (count > 0) { //Pick a random member.
- do {
- i = rand()%count;
- if (pc_additem(psd[i],&fitem->item_data,fitem->item_data.amount))
- { //Discard this receiver.
- psd[i] = psd[count-1];
- count--;
- } else { //Successful pick.
- first_sd = psd[i];
- break;
- }
- } while (count > 0);
- }
- }
- }
- if (!first_sd) { //Noone has picked it up yet...
- if ((flag = pc_additem(sd,&fitem->item_data,fitem->item_data.amount))) {
+ if ((flag = party_share_loot(p,sd,&fitem->item_data))) {
clif_additem(sd,0,0,flag);
return 1;
}
first_sd = sd;
- }
+ } else
if(log_config.pick) //Logs items, taken by (P)layers [Lupus]
log_pick(first_sd, "P", 0, fitem->item_data.nameid, fitem->item_data.amount, (struct item*)&fitem->item_data);
- //Logs
- if(battle_config.party_show_share_picker && first_sd != sd){
- char output[80];
- sprintf(output, "%s acquired the item.",first_sd->status.name);
- clif_disp_onlyself(sd,output,strlen(output));
- }
+
//Display pickup animation.
if(sd->attacktimer != -1)
@@ -3698,7 +3652,7 @@ int pc_stop_walking (struct map_session_data *sd, int type) sd->walkpath.path_len = 0;
sd->to_x = sd->bl.x;
sd->to_y = sd->bl.y;
- if (type & 0x01)
+ if (type & 0x01 && !pc_issit(sd)) //Trying to fixpos while sitting makes you seem standing. [Skotlex]
clif_fixpos(&sd->bl);
if (sd->sc.data[SC_RUN].timer != -1)
status_change_end(&sd->bl, SC_RUN, -1);
|