- Corrected pc_checkitem not behaving correctly when you had more than one equip with a restricted card.
- Fixed non-chatroom owners being able to kick others from the chatroom. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12310 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
60db8e94f3
commit
5a8962fca0
@ -4,6 +4,8 @@ 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.
|
||||
|
||||
2008/03/06
|
||||
* Fixed non-chatroom owners being able to kick others from the chatroom.
|
||||
[Skotlex]
|
||||
* Fixed a crash when a homun kills a mvp and the char that did
|
||||
the most damage is unable to carry the mvp reward (bugreport:1114)
|
||||
2008/03/05
|
||||
|
@ -42,7 +42,7 @@ int mapif_info_homunculus(int fd, int account_id, struct s_homunculus *hd)
|
||||
WFIFOW(fd,0) = 0x3891;
|
||||
WFIFOW(fd,2) = sizeof(struct s_homunculus)+9;
|
||||
WFIFOL(fd,4) = account_id;
|
||||
WFIFOB(fd,8) = 1; // account loaded with success
|
||||
WFIFOB(fd,8) = 1; // success
|
||||
|
||||
memcpy(WFIFOP(fd,9), hd, sizeof(struct s_homunculus));
|
||||
WFIFOSET(fd, sizeof(struct s_homunculus)+9);
|
||||
@ -219,7 +219,7 @@ int mapif_load_homunculus(int fd)
|
||||
Sql_GetData(sql_handle, 0, &data, NULL);
|
||||
i = atoi(data);
|
||||
if( i < HM_SKILLBASE || i >= HM_SKILLBASE + MAX_HOMUNSKILL )
|
||||
continue;// invalid guild skill
|
||||
continue;// invalid skill id
|
||||
i = i - HM_SKILLBASE;
|
||||
homun_pt->hskill[i].id = (unsigned short)atoi(data);
|
||||
// lv
|
||||
|
@ -273,7 +273,7 @@ int chat_kickchat(struct map_session_data* sd, const char* kickusername)
|
||||
|
||||
cd = (struct chat_data *)map_id2bl(sd->chatID);
|
||||
|
||||
if( !cd )
|
||||
if( cd==NULL || (struct block_list *)sd != cd->owner )
|
||||
return -1;
|
||||
|
||||
ARR_FIND( 0, cd->users, i, strncmp(cd->usersd[i]->status.name, kickusername, NAME_LENGTH) == 0 );
|
||||
|
40
src/map/pc.c
40
src/map/pc.c
@ -6564,37 +6564,25 @@ int pc_checkitem(struct map_session_data *sd)
|
||||
|
||||
if(sd->status.inventory[i].nameid==0)
|
||||
continue;
|
||||
if(sd->status.inventory[i].equip & ~pc_equippoint(sd,i)) {
|
||||
|
||||
if(!sd->status.inventory[i].equip)
|
||||
continue;
|
||||
|
||||
if (sd->status.inventory[i].equip&~pc_equippoint(sd,i)) {
|
||||
sd->status.inventory[i].equip=0;
|
||||
calc_flag = 1;
|
||||
continue;
|
||||
}
|
||||
//?”õ<E2809D>§ŒÀƒ`ƒFƒbƒN
|
||||
if(sd->status.inventory[i].equip && it) {
|
||||
if (map[sd->bl.m].flag.pvp && it->flag.no_equip&1)
|
||||
{ //PVP check for forbiden items. optimized by [Lupus]
|
||||
sd->status.inventory[i].equip=0;
|
||||
calc_flag = 1;
|
||||
} else
|
||||
if (map_flag_gvg(sd->bl.m) && it->flag.no_equip&2)
|
||||
{ //GvG optimized by [Lupus]
|
||||
sd->status.inventory[i].equip=0;
|
||||
calc_flag = 1;
|
||||
} else
|
||||
if(map[sd->bl.m].flag.restricted && it->flag.no_equip&map[sd->bl.m].zone)
|
||||
{ // Restricted zone by [Komurka]
|
||||
sd->status.inventory[i].equip=0;
|
||||
calc_flag = 1;
|
||||
}
|
||||
if (!calc_flag) { //Check cards
|
||||
int flag;
|
||||
flag = (map[sd->bl.m].flag.restricted?map[sd->bl.m].zone:0)
|
||||
if(it) {
|
||||
//check for forbiden items.
|
||||
int flag =
|
||||
(map[sd->bl.m].flag.restricted?map[sd->bl.m].zone:0)
|
||||
| (map[sd->bl.m].flag.pvp?1:0)
|
||||
| (map_flag_gvg(sd->bl.m)?2:0);
|
||||
if (flag && !pc_isAllowedCardOn(sd,it->slot,i,flag))
|
||||
{
|
||||
sd->status.inventory[i].equip=0;
|
||||
calc_flag = 1;
|
||||
}
|
||||
if (flag && (it->flag.no_equip&flag || !pc_isAllowedCardOn(sd,it->slot,i,flag)))
|
||||
{
|
||||
sd->status.inventory[i].equip=0;
|
||||
calc_flag = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user