diff options
author | mc_cameri <mc_cameri@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-22 21:25:28 +0000 |
---|---|---|
committer | mc_cameri <mc_cameri@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-22 21:25:28 +0000 |
commit | 1c98baf3ab95a8312385e19029d2c9abf352f78a (patch) | |
tree | 717184528d1ba54ba969c556edd514eb2acce3b2 /src/map | |
parent | 73bb1f7559cd9956deb81fbd6fa93f6155102322 (diff) | |
download | hercules-1c98baf3ab95a8312385e19029d2c9abf352f78a.tar.gz hercules-1c98baf3ab95a8312385e19029d2c9abf352f78a.tar.bz2 hercules-1c98baf3ab95a8312385e19029d2c9abf352f78a.tar.xz hercules-1c98baf3ab95a8312385e19029d2c9abf352f78a.zip |
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@331 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/atcommand.c | 17 | ||||
-rw-r--r-- | src/map/atcommand.h | 1 | ||||
-rw-r--r-- | src/map/charcommand.c | 1 | ||||
-rw-r--r-- | src/map/script.c | 9 |
4 files changed, 24 insertions, 4 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index b8368db1d..7ea5eb975 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -220,6 +220,7 @@ ATCOMMAND_FUNC(refresh); // by MC Cameri ATCOMMAND_FUNC(petid); // by MC Cameri ATCOMMAND_FUNC(identify); // by MC Cameri ATCOMMAND_FUNC(gmotd); // Added by MC Cameri, created by davidsiaw +ATCOMMAND_FUNC(misceffect); // by MC Cameri #ifndef TXT_ONLY ATCOMMAND_FUNC(checkmail); // [Valaris] @@ -475,6 +476,7 @@ static AtCommandInfo atcommand_info[] = { { AtCommand_PetId, "@petid", 40, atcommand_petid }, // by MC Cameri { AtCommand_Identify, "@identify", 40, atcommand_identify }, // by MC Cameri { AtCommand_Gmotd, "@gmotd", 0, atcommand_gmotd }, // Added by MC Cameri, created by davidsiaw + { AtCommand_MiscEffect, "@misceffect", 50, atcommand_misceffect }, // by MC Cameri #ifndef TXT_ONLY // sql-only commands { AtCommand_CheckMail, "@checkmail", 1, atcommand_listmail }, // [Valaris] @@ -7914,6 +7916,21 @@ atcommand_gmotd( return 0; } +int atcommand_misceffect( + const int fd, struct map_session_data* sd, + const char* command, const char* message) +{ + int effect = 0; + nullpo_retr(-1, sd); + if (!message || !*message) + return -1; + if (sscanf(message, "%d", &effect) < 1) + return -1; + clif_misceffect(&sd->bl,effect); + + return 0; +} + #ifndef TXT_ONLY /* Begin SQL-Only commands */ /*========================================== diff --git a/src/map/atcommand.h b/src/map/atcommand.h index 77ecebf79..a87166064 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -200,6 +200,7 @@ enum AtCommandType { AtCommand_PetId, // by MC Cameri AtCommand_Identify, // by MC Cameri AtCommand_Gmotd, // Added by MC Cameri, created by davidsiaw + AtCommand_MiscEffect, // by MC Cameri // SQL-only commands start #ifndef TXT_ONLY diff --git a/src/map/charcommand.c b/src/map/charcommand.c index 6a8b0cbeb..c2e091302 100644 --- a/src/map/charcommand.c +++ b/src/map/charcommand.c @@ -408,6 +408,7 @@ int charcommand_petfriendly( t = pl_sd->pet.intimate;
pl_sd->pet.intimate = friendly;
clif_send_petstatus(pl_sd);
+ clif_pet_emotion(pl_sd->pd,0);
if (battle_config.pet_status_support) {
if ((pl_sd->pet.intimate > 0 && t <= 0) ||
(pl_sd->pet.intimate <= 0 && t > 0)) {
diff --git a/src/map/script.c b/src/map/script.c index 0f76d4ec7..f198d42fe 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2916,12 +2916,13 @@ int buildin_getequipisenableref(struct script_state *st) num=conv_num(st,& (st->stack->stack_data[st->start+2])); sd=script_rid2sd(st); i=pc_checkequip(sd,equip[num-1]); - if(i >= 0 && num<7 && sd->inventory_data[i] && (num!=1 || sd->inventory_data[i]->def > 1 + if(i >= 0 && num<7 && sd->inventory_data[i] && (num!=1 + || sd->inventory_data[i]->def > 1 || (sd->inventory_data[i]->def==1 && sd->inventory_data[i]->equip_script==NULL) - || (sd->inventory_data[i]->def<=0 && sd->inventory_data[i]->equip_script!=NULL)) - ){ + || (sd->inventory_data[i]->def<=0 && sd->inventory_data[i]->equip_script!=NULL))) + { push_val(st->stack,C_INT,1); - }else{ + } else { push_val(st->stack,C_INT,0); } |