summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorAsheraf <acheraf1998@gmail.com>2018-07-17 19:33:32 +0100
committerAsheraf <acheraf1998@gmail.com>2018-07-24 14:21:01 +0100
commit0ad1e08ee15ac0112cad6d94e67584a5ce571c53 (patch)
tree26c5499cd4684f736bf5e8d986ce12d35fe474a2 /src/map/script.c
parent504ad2ca7d6ef4923093f74ac2afd5fc1bd39fd1 (diff)
downloadhercules-0ad1e08ee15ac0112cad6d94e67584a5ce571c53.tar.gz
hercules-0ad1e08ee15ac0112cad6d94e67584a5ce571c53.tar.bz2
hercules-0ad1e08ee15ac0112cad6d94e67584a5ce571c53.tar.xz
hercules-0ad1e08ee15ac0112cad6d94e67584a5ce571c53.zip
Correct wrong attribute used for pet evolution egg hiding
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 9a5d33604..1e635b622 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -9245,6 +9245,8 @@ static BUILDIN(getbrokenid)
num=script_getnum(st,2);
for(i=0; i<MAX_INVENTORY; i++) {
+ if (sd->status.inventory[i].card[0] == CARD0_PET)
+ continue;
if ((sd->status.inventory[i].attribute & ATTR_BROKEN) != 0) {
brokencounter++;
if(num==brokencounter) {
@@ -9270,6 +9272,8 @@ static BUILDIN(getbrokencount)
return true;
for (i = 0; i < MAX_INVENTORY; i++) {
+ if (sd->status.inventory[i].card[0] == CARD0_PET)
+ continue;
if ((sd->status.inventory[i].attribute & ATTR_BROKEN) != 0)
counter++;
}
@@ -9292,6 +9296,8 @@ static BUILDIN(repair)
num=script_getnum(st,2);
for(i=0; i<MAX_INVENTORY; i++) {
+ if (sd->status.inventory[i].card[0] == CARD0_PET)
+ continue;
if ((sd->status.inventory[i].attribute & ATTR_BROKEN) != 0) {
repaircounter++;
if(num==repaircounter) {
@@ -9320,6 +9326,8 @@ static BUILDIN(repairall)
for(i = 0; i < MAX_INVENTORY; i++)
{
+ if (sd->status.inventory[i].card[0] == CARD0_PET)
+ continue;
if (sd->status.inventory[i].nameid && (sd->status.inventory[i].attribute & ATTR_BROKEN) != 0)
{
sd->status.inventory[i].attribute |= ATTR_BROKEN;