summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-08 22:53:15 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-08 22:53:15 +0000
commit5c0f510e8e7b0fb9cdf269f0408d1686c7f405d9 (patch)
tree1c87958830c0a501e0bf1e138a9d8f61b22a0d74
parent119ff0550b0f4d5e09b9cba41c2f56723c58ca5d (diff)
downloadhercules-5c0f510e8e7b0fb9cdf269f0408d1686c7f405d9.tar.gz
hercules-5c0f510e8e7b0fb9cdf269f0408d1686c7f405d9.tar.bz2
hercules-5c0f510e8e7b0fb9cdf269f0408d1686c7f405d9.tar.xz
hercules-5c0f510e8e7b0fb9cdf269f0408d1686c7f405d9.zip
file props
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@516 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Dev/scripting.txt18
-rw-r--r--npc/other/mc_cameri/heal.txt58
-rw-r--r--npc/quests/newgears/fox_mask.txt114
-rw-r--r--sql-files/database.sql5
-rw-r--r--src/map/battle.c11
-rw-r--r--src/map/chrif.c12
-rw-r--r--src/map/intif.c84
-rw-r--r--src/map/map.c6
8 files changed, 200 insertions, 108 deletions
diff --git a/Dev/scripting.txt b/Dev/scripting.txt
index 5aa35e713..5a143f29d 100644
--- a/Dev/scripting.txt
+++ b/Dev/scripting.txt
@@ -1,10 +1,10 @@
-Post any NPCs/DBs that need to be done or Fixed Here.
-Format is:
-
-Description - A description of the task
-Type - Whether DB, NPC or Both
-Status - The status of the task. The possible values are Pending and Completed
-Assignee - The nickname of the person whom is assigned the task
-Notes - Miscellaneous notes concerning the task
-
+Post any NPCs/DBs that need to be done or Fixed Here.
+Format is:
+
+Description - A description of the task
+Type - Whether DB, NPC or Both
+Status - The status of the task. The possible values are Pending and Completed
+Assignee - The nickname of the person whom is assigned the task
+Notes - Miscellaneous notes concerning the task
+
-------------------------- \ No newline at end of file
diff --git a/npc/other/mc_cameri/heal.txt b/npc/other/mc_cameri/heal.txt
index b99eb03e2..a3135f855 100644
--- a/npc/other/mc_cameri/heal.txt
+++ b/npc/other/mc_cameri/heal.txt
@@ -1,30 +1,30 @@
-//===== eAthena Script =======================================
-//= Heal Npc
-//===== By: ==================================================
-//= MC Cameri
-//===== Current Version: =====================================
-//= 1.0
-//===== Compatible With: =====================================
-//= eAthena 0.1+;
-//===== Description: =========================================
-//= Poring Which Heals For Free
-//===== Additional Comments: =================================
-//= You can use this one if you want simple one-click healing
-//============================================================
-
-prontera.gat,150,184,5 script Healring::Healring0 1002,{
- npctalk "Booing!";
- emotion 21;
- percentheal 100,100;
-}
-
-morocc.gat,159,96,5 duplicate(Healring0) Healring 1002
-geffen.gat,121,61,5 duplicate(Healring0) Healring 1002
-payon.gat,180,105,5 duplicate(Healring0) Healring 1002
-alberta.gat,185,144,5 duplicate(Healring0) Healring 1002
-aldebaran.gat,134,123,5 duplicate(Healring0) Healring 1002
-izlude.gat,125,118,5 duplicate(Healring0) Healring 1002
-xmas.gat,149,136,5 duplicate(Healring0) Healring 1002
-comodo.gat,188,162,5 duplicate(Healring0) Healring 1002
-amatsu.gat,200,80,5 duplicate(Healring0) Healring 1002
+//===== eAthena Script =======================================
+//= Heal Npc
+//===== By: ==================================================
+//= MC Cameri
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena 0.1+;
+//===== Description: =========================================
+//= Poring Which Heals For Free
+//===== Additional Comments: =================================
+//= You can use this one if you want simple one-click healing
+//============================================================
+
+prontera.gat,150,184,5 script Healring::Healring0 1002,{
+ npctalk "Booing!";
+ emotion 21;
+ percentheal 100,100;
+}
+
+morocc.gat,159,96,5 duplicate(Healring0) Healring 1002
+geffen.gat,121,61,5 duplicate(Healring0) Healring 1002
+payon.gat,180,105,5 duplicate(Healring0) Healring 1002
+alberta.gat,185,144,5 duplicate(Healring0) Healring 1002
+aldebaran.gat,134,123,5 duplicate(Healring0) Healring 1002
+izlude.gat,125,118,5 duplicate(Healring0) Healring 1002
+xmas.gat,149,136,5 duplicate(Healring0) Healring 1002
+comodo.gat,188,162,5 duplicate(Healring0) Healring 1002
+amatsu.gat,200,80,5 duplicate(Healring0) Healring 1002
gonryun.gat,164,130,5 duplicate(Healring0) Healring 1002 \ No newline at end of file
diff --git a/npc/quests/newgears/fox_mask.txt b/npc/quests/newgears/fox_mask.txt
index 8d8a2474e..7f6a5eb89 100644
--- a/npc/quests/newgears/fox_mask.txt
+++ b/npc/quests/newgears/fox_mask.txt
@@ -1,57 +1,57 @@
-//===== eAthena Script =======================================
-//= Fox Mask Quest
-//===== By: ==================================================
-//= KitsuneStarWind (1.0)
-//= Mass Zero (1.1)
-//===== Current Version: =====================================
-//= 1.2
-//===== Compatible With: =====================================
-//= Any eAthena version.
-//===== Description: =========================================
-// Seperate quest for the Fox Mask.
-//===== Additional Comments: =================================
-// 1.2 optimized [Lupus]
-//============================================================
-
-pay_dun04.gat,204,152,2 script Nine Tail 1180,{
- mes "[Nine Tail]";
- mes "What do you want?";
- next;
- mes "[Nine Tail]";
- mes "Have you come here for a ^FF3300 Fox Mask^000000?";
- next;
- menu "Yeah, Sure.",-,"No",M_EXIT;
-
- mes "[Nine Tail]";
- mes "Fine then. If I make one for you, will you go away?";
- mes "You realize that it requires 999 Nine Tails to make, do you?";
- next;
- menu "Sure.",M_MAKE,"Nah.",-;
-
- mes "[Nine Tail]";
- mes "Grrrr... I'll make one anyway but I hope my master gets you.";
- next;
-M_MAKE:
- mes "[Nine Tail]";
- mes "Ok then, I shall make one for you.";
- next;
-
- if (countitem(1022) < 999) goto L_NOITEM;//Items: Nine Tails,
- delitem 1022,999;//Items: Nine Tails,
- getitem 5069,1;//Items: Fox Mask,
- next;
- mes "[Nine Tails]";
- mes "Have fun.";
- close;
-
-L_NOITEM:
- mes "[Nine Tail]";
- mes "You do not have have enough Nine Tails.";
- mes "You need 999 of them.";
- close;
-
-M_EXIT:
- mes "[Nine Tail]";
- mes "Then leave me alone... I am waiting for my master.";
- close;
-}
+//===== eAthena Script =======================================
+//= Fox Mask Quest
+//===== By: ==================================================
+//= KitsuneStarWind (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any eAthena version.
+//===== Description: =========================================
+// Seperate quest for the Fox Mask.
+//===== Additional Comments: =================================
+// 1.2 optimized [Lupus]
+//============================================================
+
+pay_dun04.gat,204,152,2 script Nine Tail 1180,{
+ mes "[Nine Tail]";
+ mes "What do you want?";
+ next;
+ mes "[Nine Tail]";
+ mes "Have you come here for a ^FF3300 Fox Mask^000000?";
+ next;
+ menu "Yeah, Sure.",-,"No",M_EXIT;
+
+ mes "[Nine Tail]";
+ mes "Fine then. If I make one for you, will you go away?";
+ mes "You realize that it requires 999 Nine Tails to make, do you?";
+ next;
+ menu "Sure.",M_MAKE,"Nah.",-;
+
+ mes "[Nine Tail]";
+ mes "Grrrr... I'll make one anyway but I hope my master gets you.";
+ next;
+M_MAKE:
+ mes "[Nine Tail]";
+ mes "Ok then, I shall make one for you.";
+ next;
+
+ if (countitem(1022) < 999) goto L_NOITEM;//Items: Nine Tails,
+ delitem 1022,999;//Items: Nine Tails,
+ getitem 5069,1;//Items: Fox Mask,
+ next;
+ mes "[Nine Tails]";
+ mes "Have fun.";
+ close;
+
+L_NOITEM:
+ mes "[Nine Tail]";
+ mes "You do not have have enough Nine Tails.";
+ mes "You need 999 of them.";
+ close;
+
+M_EXIT:
+ mes "[Nine Tail]";
+ mes "Then leave me alone... I am waiting for my master.";
+ close;
+}
diff --git a/sql-files/database.sql b/sql-files/database.sql
index e774125cf..9700ddb3a 100644
--- a/sql-files/database.sql
+++ b/sql-files/database.sql
@@ -1,3 +1,6 @@
+DROP DATABASE erag;
+CREATE DATABASE erag;
+USE erag;
CREATE TABLE `item_db` (
`id` smallint(5) unsigned NOT NULL default '0',
`name_english` varchar(24) NOT NULL default '',
@@ -1515,7 +1518,7 @@ INSERT INTO `item_db` VALUES (7252, 'Unknown_Item', '???', 3, NULL, NULL, 10, NU
INSERT INTO `item_db` VALUES (7253, 'Unknown_Item', '??????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `item_db` VALUES (7254, 'Unknown_Item', '???????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `item_db` VALUES (7262, 'Grave_Lump', 'Grave Lump', 3, 233, 10, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7263, 'Cat's_Eye', 'Cat's-Eye', 3, NULL, 477, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `item_db` VALUES (7263, 'Cats_Eye', 'Cats-Eye', 3, NULL, 477, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `item_db` VALUES (7264, 'Dried_Sand', 'Dried Sand', 3, NULL, 161, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `item_db` VALUES (7265, 'Dragon_Horn', 'Dragon Horn', 3, NULL, 272, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `item_db` VALUES (7266, 'Dragon_Teeth', 'Dragon Teeth', 3, 218, 10, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
diff --git a/src/map/battle.c b/src/map/battle.c
index d152a5e31..7ff7e5348 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3426,9 +3426,20 @@ static struct Damage battle_calc_pc_weapon_attack(
damage2 += damage2*(30*skill_lv)/100;
break;
case CG_ARROWVULCAN: /* アローバルカン */
+ if(!sd->state.arrow_atk && sd->arrow_atk > 0) {
+ int arr = rand()%(sd->arrow_atk+1);
+ damage += arr;
+ damage2 += arr;
+ }
damage = damage*(200+100*skill_lv)/100;
damage2 = damage2*(200+100*skill_lv)/100;
div_=9;
+ if(sd->arrow_ele > 0) {
+ s_ele = sd->arrow_ele;
+ s_ele_ = sd->arrow_ele;
+ }
+ flag=(flag&~BF_RANGEMASK)|BF_LONG;
+ sd->state.arrow_atk = 1;
break;
case AS_SPLASHER: /* ベナムスプラッシャー */
damage = damage*(200+20*skill_lv+20*pc_checkskill(sd,AS_POISONREACT))/100;
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 62e6e8953..59e8adb48 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -980,17 +980,7 @@ int chrif_parse(int fd)
if (fd == char_fd) {
printf("Map-server can't connect to char-server (connection #%d).\n", fd);
char_fd = -1;
- check_connect_char_server(0, 0, 0, 0);
- while (char_fd <= 0 || session[char_fd] == NULL) {
- struct map_session_data *sd;
- int idx;
- for (idx = 0; idx <fd_max; idx++)
- if ((session[idx] != NULL) && (sd = session[idx]->session_data) && sd && sd->state.auth)
- clif_displaymessage(idx, "Map server is paused waiting for char server to return..");
- flush_fifos();
- sleep(10);
- check_connect_char_server(0, 0, 0, 0);
- }
+// check_connect_char_server(0, 0, 0, 0);
}
close(fd);
delete_session(fd);
diff --git a/src/map/intif.c b/src/map/intif.c
index fc79e5148..66428d13d 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -54,10 +54,16 @@ extern int char_fd; // inter serverのfdはchar_fdを使う
//-----------------------------------------------------------------
// inter serverへの送信
+int CheckForCharServer() {
+ return ((char_fd == -1) || session[char_fd] == NULL || session[char_fd]->wdata == NULL);
+}
+
// pet
int intif_create_pet(int account_id,int char_id,short pet_class,short pet_lv,short pet_egg_id,
short pet_equip,short intimate,short hungry,char rename_flag,char incuvate,char *pet_name)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3080;
WFIFOL(inter_fd,2) = account_id;
WFIFOL(inter_fd,6) = char_id;
@@ -77,6 +83,8 @@ int intif_create_pet(int account_id,int char_id,short pet_class,short pet_lv,sho
int intif_request_petdata(int account_id,int char_id,int pet_id)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3081;
WFIFOL(inter_fd,2) = account_id;
WFIFOL(inter_fd,6) = char_id;
@@ -88,6 +96,8 @@ int intif_request_petdata(int account_id,int char_id,int pet_id)
int intif_save_petdata(int account_id,struct s_pet *p)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3082;
WFIFOW(inter_fd,2) = sizeof(struct s_pet) + 8;
WFIFOL(inter_fd,4) = account_id;
@@ -99,6 +109,8 @@ int intif_save_petdata(int account_id,struct s_pet *p)
int intif_delete_petdata(int pet_id)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3083;
WFIFOL(inter_fd,2) = pet_id;
WFIFOSET(inter_fd,6);
@@ -110,6 +122,8 @@ int intif_delete_petdata(int pet_id)
int intif_GMmessage(char* mes,int len,int flag)
{
int lp = (flag&0x10) ? 8 : 4;
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3000;
WFIFOW(inter_fd,2) = lp + len;
WFIFOL(inter_fd,4) = 0x65756c62;
@@ -122,6 +136,8 @@ int intif_GMmessage(char* mes,int len,int flag)
// The transmission of Wisp/Page to inter-server (player not found on this server)
int intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int mes_len) {
nullpo_retr(0, sd);
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3001;
WFIFOW(inter_fd,2) = mes_len + 52;
@@ -138,6 +154,8 @@ int intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int me
// The reply of Wisp/page
int intif_wis_replay(int id, int flag) {
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3002;
WFIFOL(inter_fd,2) = id;
WFIFOB(inter_fd,6) = flag; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
@@ -151,6 +169,8 @@ int intif_wis_replay(int id, int flag) {
// The transmission of GM only Wisp/Page from server to inter-server
int intif_wis_message_to_gm(char *Wisp_name, int min_gm_level, char *mes, int mes_len) {
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3003;
WFIFOW(inter_fd,2) = mes_len + 30;
memcpy(WFIFOP(inter_fd,4), Wisp_name, 24);
@@ -167,6 +187,8 @@ int intif_wis_message_to_gm(char *Wisp_name, int min_gm_level, char *mes, int me
// アカウント変数送信
int intif_saveaccountreg(struct map_session_data *sd) {
int j,p;
+ if (CheckForCharServer())
+ return 0;
nullpo_retr(0, sd);
@@ -184,6 +206,8 @@ int intif_saveaccountreg(struct map_session_data *sd) {
int intif_request_accountreg(struct map_session_data *sd)
{
nullpo_retr(0, sd);
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3005;
WFIFOL(inter_fd,2) = sd->bl.id;
@@ -194,6 +218,8 @@ int intif_request_accountreg(struct map_session_data *sd)
// 倉庫データ要求
int intif_request_storage(int account_id)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3010;
WFIFOL(inter_fd,2) = account_id;
WFIFOSET(inter_fd,6);
@@ -202,6 +228,8 @@ int intif_request_storage(int account_id)
// 倉庫データ送信
int intif_send_storage(struct storage *stor)
{
+ if (CheckForCharServer())
+ return 0;
nullpo_retr(0, stor);
WFIFOW(inter_fd,0) = 0x3011;
WFIFOW(inter_fd,2) = sizeof(struct storage)+8;
@@ -213,6 +241,8 @@ int intif_send_storage(struct storage *stor)
int intif_request_guild_storage(int account_id,int guild_id)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3018;
WFIFOL(inter_fd,2) = account_id;
WFIFOL(inter_fd,6) = guild_id;
@@ -221,6 +251,8 @@ int intif_request_guild_storage(int account_id,int guild_id)
}
int intif_send_guild_storage(int account_id,struct guild_storage *gstor)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3019;
WFIFOW(inter_fd,2) = sizeof(struct guild_storage)+12;
WFIFOL(inter_fd,4) = account_id;
@@ -233,6 +265,8 @@ int intif_send_guild_storage(int account_id,struct guild_storage *gstor)
// パーティ作成要求
int intif_create_party(struct map_session_data *sd,char *name)
{
+ if (CheckForCharServer())
+ return 0;
nullpo_retr(0, sd);
WFIFOW(inter_fd,0) = 0x3020;
@@ -249,6 +283,8 @@ int intif_create_party(struct map_session_data *sd,char *name)
// パーティ情報要求
int intif_request_partyinfo(int party_id)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3021;
WFIFOL(inter_fd,2) = party_id;
WFIFOSET(inter_fd,6);
@@ -260,6 +296,8 @@ int intif_request_partyinfo(int party_id)
int intif_party_addmember(int party_id,int account_id)
{
struct map_session_data *sd;
+ if (CheckForCharServer())
+ return 0;
sd=map_id2sd(account_id);
// if(battle_config.etc_log)
// printf("intif: party add member %d %d\n",party_id,account_id);
@@ -277,6 +315,8 @@ int intif_party_addmember(int party_id,int account_id)
// パーティ設定変更
int intif_party_changeoption(int party_id,int account_id,int exp,int item)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x3023;
WFIFOL(inter_fd,2)=party_id;
WFIFOL(inter_fd,6)=account_id;
@@ -288,6 +328,8 @@ int intif_party_changeoption(int party_id,int account_id,int exp,int item)
// パーティ脱退要求
int intif_party_leave(int party_id,int account_id)
{
+ if (CheckForCharServer())
+ return 0;
// if(battle_config.etc_log)
// printf("intif: party leave %d %d\n",party_id,account_id);
WFIFOW(inter_fd,0)=0x3024;
@@ -299,6 +341,8 @@ int intif_party_leave(int party_id,int account_id)
// パーティ移動要求
int intif_party_changemap(struct map_session_data *sd,int online)
{
+ if (CheckForCharServer())
+ return 0;
if(sd!=NULL){
WFIFOW(inter_fd,0)=0x3025;
WFIFOL(inter_fd,2)=sd->status.party_id;
@@ -315,6 +359,8 @@ int intif_party_changemap(struct map_session_data *sd,int online)
// パーティー解散要求
int intif_break_party(int party_id)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x3026;
WFIFOL(inter_fd,2)=party_id;
WFIFOSET(inter_fd,6);
@@ -323,6 +369,8 @@ int intif_break_party(int party_id)
// パーティ会話送信
int intif_party_message(int party_id,int account_id,char *mes,int len)
{
+ if (CheckForCharServer())
+ return 0;
// if(battle_config.etc_log)
// printf("intif_party_message: %s\n",mes);
WFIFOW(inter_fd,0)=0x3027;
@@ -336,6 +384,8 @@ int intif_party_message(int party_id,int account_id,char *mes,int len)
// パーティ競合チェック要求
int intif_party_checkconflict(int party_id,int account_id,char *nick)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x3028;
WFIFOL(inter_fd,2)=party_id;
WFIFOL(inter_fd,6)=account_id;
@@ -347,6 +397,8 @@ int intif_party_checkconflict(int party_id,int account_id,char *nick)
// ギルド作成要求
int intif_guild_create(const char *name,const struct guild_member *master)
{
+ if (CheckForCharServer())
+ return 0;
nullpo_retr(0, master);
WFIFOW(inter_fd,0)=0x3030;
@@ -360,6 +412,8 @@ int intif_guild_create(const char *name,const struct guild_member *master)
// ギルド情報要求
int intif_guild_request_info(int guild_id)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3031;
WFIFOL(inter_fd,2) = guild_id;
WFIFOSET(inter_fd,6);
@@ -368,6 +422,8 @@ int intif_guild_request_info(int guild_id)
// ギルドメンバ追加要求
int intif_guild_addmember(int guild_id,struct guild_member *m)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3032;
WFIFOW(inter_fd,2) = sizeof(struct guild_member)+8;
WFIFOL(inter_fd,4) = guild_id;
@@ -378,6 +434,8 @@ int intif_guild_addmember(int guild_id,struct guild_member *m)
// ギルドメンバ脱退/追放要求
int intif_guild_leave(int guild_id,int account_id,int char_id,int flag,const char *mes)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd, 0) = 0x3034;
WFIFOL(inter_fd, 2) = guild_id;
WFIFOL(inter_fd, 6) = account_id;
@@ -391,6 +449,8 @@ int intif_guild_leave(int guild_id,int account_id,int char_id,int flag,const cha
int intif_guild_memberinfoshort(int guild_id,
int account_id,int char_id,int online,int lv,int class)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd, 0) = 0x3035;
WFIFOL(inter_fd, 2) = guild_id;
WFIFOL(inter_fd, 6) = account_id;
@@ -404,6 +464,8 @@ int intif_guild_memberinfoshort(int guild_id,
// ギルド解散通知
int intif_guild_break(int guild_id)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd, 0) = 0x3036;
WFIFOL(inter_fd, 2) = guild_id;
WFIFOSET(inter_fd,6);
@@ -412,6 +474,8 @@ int intif_guild_break(int guild_id)
// ギルド会話送信
int intif_guild_message(int guild_id,int account_id,char *mes,int len)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x3037;
WFIFOW(inter_fd,2)=len+12;
WFIFOL(inter_fd,4)=guild_id;
@@ -423,6 +487,8 @@ int intif_guild_message(int guild_id,int account_id,char *mes,int len)
// ギルド競合チェック要求
int intif_guild_checkconflict(int guild_id,int account_id,int char_id)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd, 0)=0x3038;
WFIFOL(inter_fd, 2)=guild_id;
WFIFOL(inter_fd, 6)=account_id;
@@ -433,6 +499,8 @@ int intif_guild_checkconflict(int guild_id,int account_id,int char_id)
// ギルド基本情報変更要求
int intif_guild_change_basicinfo(int guild_id,int type,const void *data,int len)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x3039;
WFIFOW(inter_fd,2)=len+10;
WFIFOL(inter_fd,4)=guild_id;
@@ -445,6 +513,8 @@ int intif_guild_change_basicinfo(int guild_id,int type,const void *data,int len)
int intif_guild_change_memberinfo(int guild_id,int account_id,int char_id,
int type,const void *data,int len)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd, 0)=0x303a;
WFIFOW(inter_fd, 2)=len+18;
WFIFOL(inter_fd, 4)=guild_id;
@@ -458,6 +528,8 @@ int intif_guild_change_memberinfo(int guild_id,int account_id,int char_id,
// ギルド役職変更要求
int intif_guild_position(int guild_id,int idx,struct guild_position *p)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x303b;
WFIFOW(inter_fd,2)=sizeof(struct guild_position)+12;
WFIFOL(inter_fd,4)=guild_id;
@@ -469,6 +541,8 @@ int intif_guild_position(int guild_id,int idx,struct guild_position *p)
// ギルドスキルアップ要求
int intif_guild_skillup(int guild_id,int skill_num,int account_id,int flag)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd, 0)=0x303c;
WFIFOL(inter_fd, 2)=guild_id;
WFIFOL(inter_fd, 6)=skill_num;
@@ -480,6 +554,8 @@ int intif_guild_skillup(int guild_id,int skill_num,int account_id,int flag)
// ギルド同盟/敵対要求
int intif_guild_alliance(int guild_id1,int guild_id2,int account_id1,int account_id2,int flag)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd, 0)=0x303d;
WFIFOL(inter_fd, 2)=guild_id1;
WFIFOL(inter_fd, 6)=guild_id2;
@@ -492,6 +568,8 @@ int intif_guild_alliance(int guild_id1,int guild_id2,int account_id1,int account
// ギルド告知変更要求
int intif_guild_notice(int guild_id,const char *mes1,const char *mes2)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x303e;
WFIFOL(inter_fd,2)=guild_id;
memcpy(WFIFOP(inter_fd,6),mes1,60);
@@ -502,6 +580,8 @@ int intif_guild_notice(int guild_id,const char *mes1,const char *mes2)
// ギルドエンブレム変更要求
int intif_guild_emblem(int guild_id,int len,const char *data)
{
+ if (CheckForCharServer())
+ return 0;
if(guild_id<=0 || len<0 || len>2000)
return 0;
WFIFOW(inter_fd,0)=0x303f;
@@ -515,6 +595,8 @@ int intif_guild_emblem(int guild_id,int len,const char *data)
//現在のギルド城占領ギルドを調べる
int intif_guild_castle_dataload(int castle_id,int index)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x3040;
WFIFOW(inter_fd,2)=castle_id;
WFIFOB(inter_fd,4)=index;
@@ -525,6 +607,8 @@ int intif_guild_castle_dataload(int castle_id,int index)
//ギルド城占領ギルド変更要求
int intif_guild_castle_datasave(int castle_id,int index, int value)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x3041;
WFIFOW(inter_fd,2)=castle_id;
WFIFOB(inter_fd,4)=index;
diff --git a/src/map/map.c b/src/map/map.c
index 9f0ac1dde..9eb46ed88 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -547,8 +547,12 @@ void map_foreachinmovearea(int (*func)(struct block_list*,va_list),int m,int x0,
map_freeblock_lock(); // メモリからの解放を禁止する
for(i=blockcount;i<bl_list_count;i++)
- if(bl_list[i]->prev) // 有効かどうかチェック
+ if(bl_list[i]->prev) { // 有効かどうかチェック
+ if (bl_list[i]->type == BL_PC
+ && session[((struct map_session_data *) bl_list[i])->fd] == NULL)
+ continue;
func(bl_list[i],ap);
+ }
map_freeblock_unlock(); // 解放を許可する