summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-22 16:08:24 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-22 16:08:24 +0000
commitf65bf4bd28cd9240c889bfd2a1f4650d91760a2d (patch)
tree6730a4d5ca802cc2c4cdb128dca07f1e95cac0fb
parent6b0b62a5b2a9d85f60afe4fe048403101bd8f39d (diff)
downloadhercules-f65bf4bd28cd9240c889bfd2a1f4650d91760a2d.tar.gz
hercules-f65bf4bd28cd9240c889bfd2a1f4650d91760a2d.tar.bz2
hercules-f65bf4bd28cd9240c889bfd2a1f4650d91760a2d.tar.xz
hercules-f65bf4bd28cd9240c889bfd2a1f4650d91760a2d.zip
* Corrected Spiral Pierce's hits in the skill_db
* Moved /common/*.o into a obj folder when compiling * Updated core and map server to jA 1094~1115 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1162 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-SVN.txt20
-rw-r--r--Readme-jap2939
-rw-r--r--db/skill_cast_db.txt20
-rw-r--r--db/skill_db.txt2
-rw-r--r--db/skill_unit_db.txt78
-rw-r--r--src/char/Makefile2
-rw-r--r--src/char_sql/Makefile2
-rw-r--r--src/common/Makefile34
-rw-r--r--src/common/core.c74
-rw-r--r--src/common/db.c20
-rw-r--r--src/common/db.h10
-rw-r--r--src/common/grfio.c55
-rw-r--r--src/common/malloc.c484
-rw-r--r--src/common/malloc.h8
-rw-r--r--src/ladmin/Makefile2
-rw-r--r--src/login/Makefile2
-rw-r--r--src/login_sql/Makefile2
-rw-r--r--src/map/Makefile102
-rw-r--r--src/map/atcommand.c52
-rw-r--r--src/map/atcommand.h2
-rw-r--r--src/map/battle.c16
-rw-r--r--src/map/chrif.c11
-rw-r--r--src/map/chrif.h1
-rw-r--r--src/map/guild.c10
-rw-r--r--src/map/itemdb.c18
-rw-r--r--src/map/map.c152
-rw-r--r--src/map/map.h39
-rw-r--r--src/map/mob.c98
-rw-r--r--src/map/path.c2
-rw-r--r--src/map/pc.c93
-rw-r--r--src/map/skill.c2820
-rw-r--r--src/map/skill.h36
-rw-r--r--src/map/status.c31
-rw-r--r--src/map/status.h2
-rw-r--r--src/txt-converter/char/Makefile2
-rw-r--r--src/txt-converter/login/Makefile2
36 files changed, 5224 insertions, 2019 deletions
diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt
index f6c7813ce..0703d2cb9 100644
--- a/Changelog-SVN.txt
+++ b/Changelog-SVN.txt
@@ -1,5 +1,25 @@
Date Added
+02/23
+ * Corrected Spiral Pierce's hits in the skill_db [celest]
+ * Moved /common/*.o into a obj folder when compiling [celest]
+ * Updated core and map server to jA 1094~1115 [celest]
+ - Added End_of_exam's Memory Manager for detecting memory problems.
+ To enable remove the // in malloc.c line 11
+ // #define USE_MEMMGR
+ - Added @npctalk and @pettalk
+ - Added support for jA's local zlib
+ - Fixed a bug with path search long
+ - Updated malloc.c to support Memwatch
+ - Added DB data loss detection
+ - Added db/skill_unit_db.txt
+ - Updated skill unit system
+ - Changed Waterball to the new timerskill system
+ ~ For more detailed logs check 'Readme-jap' (knowledge in japanese required,
+ obviously ^^;)
+ Please test if there's any skills that might have suddenly stopped working,
+ thanks ^^;
+
02/22
* Revised New Cards, added missing effects, fixed bugs [Lupus]
~20 cards to check left 8) But in 22 Feb some new cards have been announced T__T'
diff --git a/Readme-jap b/Readme-jap
index 6bf23c87b..9956e4bd0 100644
--- a/Readme-jap
+++ b/Readme-jap
@@ -1,4 +1,2924 @@
--------------------
+//1114-fix1 by �H�}
+
+�Ezlib��map-server�����Ɏ�荞�߂�I�v�V������lj�
+�Emake��MinGW+Msys�Ő���ɒʂ�悤�C��
+�Ewin32_start.bat�Ƀ`�F�b�N�lj�
+
+ (src/common/zlib)
+ trees.h - anybody's guess���zlib_1_2_1_staticlib����荞��
+ inffixed.h - ����
+ inffast.h - ����
+ crc32.h - ����
+ compress.c - ����
+ deflate.h - ����
+ inftrees.h - ����
+ zutil.c - ����
+ crc32.c - ����
+ inflate.h - ����
+ inffast.c - ����
+ trees.c - ����
+ inflate.c - ����
+ zconf.h - ����
+ deflate.c - ����
+ inftrees.c - ����
+ zutil.h - ����
+ zlib.h - ����
+ adler32.c - ����
+ Makefile - LOCALZLIB���w�肳��Ă��鎞�̂݃R���p�C�����܂��B
+
+ (src/map/)
+ Makefile - MinGW�̏ꍇ�A����-wsock32��lj����܂��B
+ - LOCALZLIB���w�肳��Ă���ꍇ�����N���܂��B
+ - LOCALZLIB�������ꍇ����zlib.a�������N���܂��B
+ (src/char/)
+ Makefile - MinGW�̏ꍇ�A����-wsock32��lj����܂��B
+ (src/login/)
+ Makefile - MinGW�̏ꍇ�A����-wsock32��lj����܂��B
+ (src/common/grfio.c) - Zlib�������ۂ�_WIN32�Ƌ������Ȃ��悤�ύX
+ - zlib_win32.h zconf_win32.h��p�~
+
+ (./)
+ Makefile - #Link Zlib(NOTrecommended)�Azlib�����܂��B
+ win32_start.bat - athena-start�̔��N���[�����B�����N���ł����Ȃ��Ȃ�͂��ł��B
+
+--------------------
+//1113 by End_of_exam
+
+�Elinux �‹��ő�ʂ�warning ���o�Ă����̂��C��(malloc.h)
+�Emap_quit() ��charid_db �̃f�[�^���폜���Ȃ��悤�ɕύX(map.c thanks to lemit����)
+�Epc_eventtimer(), npc_event_timer() ��free()�Ōx�����o�Ă����̂��C��(pc.c npc.c)
+�Emap_eraseipport() �����������[�N�������o�O���C��(map.c)
+�Eaddtimer ���߂Ɏw�肷��C�x���g�����Q�R�����ɐ�������Ă����̂𖳐����ɂ���(pc.c)
+�Epc_cleareventtimer() , pc_deleventtimer() �����������[�N�������o�O���C��
+�@(pc.c thanks to Shinomori����)
+
+ (src/common/)
+ malloc.h - "#undef strdup" ��lj�
+
+ (src/map/)
+ npc.c - npc_event_timer() �C��
+ pc.c - pc_eventtimer() , pc_addeventtimer() , pc_cleareventtimer(),
+ pc_deleventtimer() �C��
+ map.c - map_quit() , map_eraseipport() �C��
+
+--------------------
+//1112 by lizorett
+�EPC���}�b�v�ړ����ɁA����PC���ݒu�����X�L�����j�b�g��skill_unit_onout���Ă΂�
+�Ȃ����(map-sever��������”\������)���C��
+�E�o�W���J���d�l�ɕ����ďC��
+�E����I������char-server���R�A�_���v��������C��
+�Emob���E�H�[�^�{�[���g�p���̃q�b�g�����C��(skill_db.txt�Ɏw�肵�����q�b�g)
+�E�R�[�e�B���O����Ă���ꍇ�ɂ̓X�g���b�v�ł��Ȃ��悤�ύX
+�E��������g�p�����ہA�O�ɏo���Ă��������ꂪ�����Ȃ����Ƃ���������C��
+
+ (db)
+ skill_db.txt
+ - mob�̃E�H�[�^�{�[���̃J�E���g����DB�ɂ��ꂽ
+ skill_unit_db.txt
+ - �o�W���J���C��
+ (char)
+ char.c - do_final()��char_dat�̃������J���ʒu��ύX
+ (map)
+ clif.c - �o�W���J���ɍU���Ȃǂ��ł��Ȃ��悤�ύX
+ map.c - �o�W���J�ʒu���Z���̃t���O�ɓ����悤�ύX
+ map.h - �o�W���J�p�̃Z���t���O�lj�
+ mob.c - �o�W���J�ɐi���ł��Ȃ��悤�ɕύX
+ pc.c - �ړ���(���Ȃ�)�Ƀo�W���J�������悤�C��
+ skill.c - �o�W���J�C��
+ - �E�H�[�^�{�[���C��
+ - skill_unit_onout�̌Ăяo�����C��
+ - �R�[�e�B���O����Ă���ӏ��̓X�g���b�v�s�‚ɕύX
+
+--------------------
+//1111 by Toshi^2
+�Epc�nmob�ɓ]�����{�q���w��ł���悤�ɕύX�B
+�@db/mob_avail.txt�ɐ�������lj������̂ŁA������Q�Ƃ��Ă��������B
+
+ (db)
+ mob_avail.txt - �����̐�����lj��B
+ (src/map)
+ clif.c - clif_mob0078() clif_mob007b() clif_pet0078() clif_pet007b() �C��
+ mob.c - mob_readdb_mobavail() �C��
+ mob.h - �\����mob_db�Ɂushort trans�v��lj��Amob_avail��trans�t���O���i�[�B
+
+--------------------
+//1110 by lizorett
+�E���j�b�g�n�X�L��(�j���}�A�_���X��)��map_server.exe������������C��
+ (�g���[�X�ł�skill_unit_onplace/skill_unit_onout�ŗ�����)
+�E�T���N�`���A���̐l���J�E���g���@��ύX(�{�I�d�l)
+�E�}�O�k�X�͈̔͂��L���A�g�p�������j�b�g���폜�����悤�ɂ���(�{�I�d�l)
+�E�f�{�[�V�����̋������Z���Ȃ�����C��(�o�O�񍐃X���b�h part8 >>15)
+�E�f�{�[�V������nullpo���o������C��
+�Emob�̃C���e�B�~�f�C�g�����������map-server������������C��(�o�O�񍐃X���b
+�h part8 >>42)
+�E�E�H�[�^�[�{�[���̎d�l��{�I�ɋ߂Â���(���ꂪ���Ȃ��ꍇ�ɂ�hit��������A
+�f�����[�W��Ŏ��s����ƃ��j�b�g��������)
+�E�t�@�[�}�V�[�̐��������m���̃R�[�h��ύX
+
+ (db)
+ skill_unit_db.txt
+ - ���j�b�gID/�z�u�Ȃǂ�db�����Ă��܂�
+ (src/map)
+ map.h - skill_unit_group�̃����o�ύX
+ mob.c - �ړ����ɃX�L�����j�b�g���f(skill_unit_out_all/skill_unit_move)
+ ��lj�
+ - �����u��/�d���u�����f��ύX
+ pc.c - �ړ����ɃX�L�����j�b�g���f(����)��lj�
+ - ���G���Ԃ��I���ۂɃX�L�����j�b�g���f(����)��lj�
+ skill.h - skill_db�̎Q�Ɗ֐���define�ɕύX
+ - �X�L���z�u������skill_unit_layout�\���̂��`
+ - SC_WATERBALL�폜
+ skill.c - unit_id��db��(skill_unit_db.txt)
+ - �X�L�����j�b�g�̃��C�A�E�g���N�����ɒ�`
+ - �ړ����ɃX�L�����j�b�g���f(����)��lj�
+ - �����u��/�d���u�����f��ύX
+ - �X�L�����j�b�g�̈ړ�������ύX
+ - �f�{�[�V�����̏C��
+ - mob�̃C���e�B�~�f�C�g�ŗ���������C��
+ - �E�H�[�^�{�[���̎d�l�ύX
+ status.c- SC_WATERBALL�̏������폜
+
+--------------------
+//1109 by End_of_exam
+
+1108�Ɉ����������������[�N�̃o�O�C���ł��B�Q�‹��ɐ[���ȃo�O�Ȃ̂ŁA
+�ŐV�łɍX�V���Ȃ����ł��C�����邱�Ƃ��������߂��܂��B
+
+�E�y�b�g�����ɃA�C�e���𗎂Ƃ����A�y�b�g�𗑂ɖ߂����Ƀ��������[�N������
+�@�������o�O���C���B(pet.c)
+
+�E�L�����N�^�[�ˑ��ꎞ�ϐ��̗��p�����L���������O�A�E�g����ƃ��������[�N��
+�@�����������o�O���C��(map.c)
+
+ (src/map)
+ map.c - map_quit() �C��
+ pet.c - pet_remove_map(), pet_return_egg() pet_lootitem_drop() �C��
+
+--------------------
+//1108 by End_of_exam
+
+�E�ȑO������������}�l�[�W���[�𓝍��B(malloc.c core.c)
+�@�L���ɂ���ɂ́Amalloc.c�����̃R�����g���O���K�v������܂��B�J���ɋ��͂���
+�@��������́A�������}�l�[�W����L���ɂ��āA�`�F�b�N����(map-server.log�Ȃ�)��
+�@�A�b�v���[�h���Ă����Ə�����܂��B
+
+�@�@1. guild.c ���R���p�C���G���[�ɂȂ����̂ŏC��(guild.c)
+�@�@2. pet.c ��������������Y��Ă����̂ŁAdo_final_pet() ��lj�(pet.c)
+�@�@3. do_final_socket ��lj����āA�I�����ɑS�Ă̐ڑ���ؒf����(socket.c)
+�@�@4. deplicate �̌��X�N���v�g���I������free����Ȃ��o�O���C��(npc.c)
+�@�@5. do_final_script �ŊJ������Ȃ�������������o�O���C��(script.c)
+�@�@6. do_init_*** �̌Ă΂�鏇�Ԃ��������������̂��C��(map.c)
+�@�@7. �C�x���g�����d�������Ƃ��Ƀ��b�Z�[�W���o���悤�ɕύX(npc.c)
+�@�@8. map_quit() ������charid_db ��free���Y�����o�O���C��(map.c)
+
+�@����8.�͍ŏd�v�ŁA�L���������O�A�E�g����x�Ƀ��������[�N����������Ƃ����A
+�@�ň��Ȍ��ʂɂȂ��Ă��܂����B�C�ɂȂ���͏C�����Ă����܂��傤�B
+
+�Edelete_session ��NULL�`�F�b�N��ӂ��Ă����o�O���C��(socket.c)
+�Echrif_disconnect_sub ��delete_session ���ĂԂ悤�ɕύX(chrif.c)
+�E�}���`���C���R�����g�i/* �` */�j�̉�͂�Y��Ă����o�O���C��(npc.c)
+�E��s�Ȃǂ�NPC ��Zeny��MAX_ZENY�ɂȂ�Ȃ��o�O���C��(pc.c)
+�E1107�̐����m�����ꕔ������Ă����̂��C��(skill.c thanks to lizorett����)
+�E�Z�[�W�]�E�����̃C�x���g���Փ˂��N�����Ă����̂��C��(npc.c)
+�@�@npc_parse_script : dup event jobsage_2nd::OnTimer150000
+�@�@npc_parse_script : dup event jobsage_2nd::OnTimer30000
+�@�@npc_parse_script : dup event jobsage_success::OnTimer7000
+�@�@npc_parse_script : dup event jobsage_success::OnTimer3000
+
+ (src/common)
+ core.c - do_init_memmgr() �lj�
+ malloc.c - �������}�l�[�W���̒lj�
+ malloc.h - �������}�l�[�W���̒lj�
+ socket.c - delete_session�̃o�O�Ado_final_socket�̒lj�
+
+ (src/map)
+ chrif.c - chrif_disconnect_sub() ���C��
+ guild.c - guild_recv_info(), guild_castledataloadack() �C��
+ map.c - map_quit() �̃��������[�N�Ado_final,do_init �C��
+ npc.c - npc_parse_script_line() , npc_parse_script() ���C��
+ pc.c - pc_setparam() �C��
+ pet.c - do_final_pet() �lj�
+ pet.h - do_final_pet() �lj�
+ script.c - do_init_script(), do_final_script() �C��
+ skill.c - skill_produce_mix() �C��
+
+--------------------
+//1107 by code
+�E@npctalk, @pettalk�R�}���h�lj�
+�E�_���[�W�̒x��������
+�E@mes��S�̔����ɏC��
+�E�t�@�[�}�V�[�̐��������m���C��
+�E@storage�őq�ɂ���d�ŊJ�����Ƃ��Ȃ��悤�C��
+�Escript�� globalmes, getmapmobs �֐���lj�
+
+ (/src/map)
+ atcommand.c
+ atcommand.h
+ battle.c
+ clif.c
+ clif.h
+ npc.c
+ npc.h
+ script.c
+ skill.c
+ storage.c
+
+--------------------
+//1106 by sylpheed
+
+�Eitem_rate_details:1�������Ȃ������̂��C��
+
+ (src/map/)
+ mob.c
+
+--------------------
+//1105 by End_of_exam
+
+�E1101�̃}�b�v�̍ĕ��z����肭�����Ȃ��o�O���C��(char.c thanks to Mystle����)
+
+ (src/char/)
+ char.c - parse_frommap() �C��
+
+--------------------
+//1104 by nameless
+�EBCC32�̃R���p�C���I�v�V�����Ȃǂ̍œK��
+�EBCC32/VC++�ōœK�ȍœK���I�v�V���������‚��邽�߂̃x���`
+�Ebcc32_clean.bat��bcc32_make.bat�𓝍��A�N���[���r���h�̎��s�����Ȃ��悤�ɁB
+
+��P4������Ƃ�Opteron���������I�v�V�����ő����Ƃ������Ƃł͂Ȃ��悤�ł��B
+��P4�ł����b�g�ɂ���Ă�-5���œK��������-3 -O2���œK�������肷����̂�����悤�ł�
+���v�����݂ŃI�v�V�������‚��Ȃ��悤�ɂ��邽�߂ɍ��܂����B
+�������ł����X�|���X���グ�ĉ^�p�������Ƃ����l�͊��p���Ă��������B
+
+ (/)
+ bcc32_make.bat
+
+ �œK���I�v�V�����̒lj��ƌx�����b�Z�[�W�Ő[���ł͂Ȃ����̂�
+ ���S�ɕ\�����Ȃ��悤�ɐݒ�Abcc32_clean.bat��make�ɓ�������
+ �̂Ŋm���ɃN���[���r���h�ł���悤�ɂȂ�܂���
+
+ bench.bat
+ bench.c
+
+ �œK�ȃR���p�C���I�v�V���������‚��邽�߂̃x���`�ł��B
+ bench.bat�ŃR���p�C�������s���s���܂��B
+ ���ʂ�bench.txt�Ɋi�[����܂��̂Ő��l�̈�ԏ��������̂�I��
+ ��bcc32_make.bat��23�s�ڂɒlj��E�C�����Ă����Ă��������B
+ ��������Ԃł�bcc32�p�ɂȂ��Ă��܂��̂�
+--------------------
+//1103 by End_of_exam
+
+�Echar_athena.conf ��default_map_type��0 �ɂȂ��Ă��鎞�ɁAPVP�K�C�h��
+�@�Z�[�u������APVP�G���A���Ń��O�A�E�g�����L���������O�C���ł��Ȃ��Ȃ�
+�@�o�O���C���B(npc_etc_pvp.txt) �����̕��X����̏��񋟊��ӂ��܂��B
+�@�inpc_etc_pvp.txt ������ ".gat" �̕t���Y��ƁA���̃~�X�ɑΉ����Ă��Ȃ�
+�@�@pc.c �̃o�O�ł��B���̃p�b�`�𓖂ĂȂ��ł��̃o�O���C���������ꍇ�A
+�@�@�Y�t�����C���t�@�C�����Q�l�ɂ��Ȃ���Anpc_etc_pvp.txt��".gat"��
+�@�@�t�������������B�j
+
+�Edo_final�����ŕs���ȏ������s���ꍇ������̂��C��(map.c thanks to lizorett����)
+�E�}�b�v�L���b�V���̓ǂݍ��݂Ɏ��s�����Ƃ��Ƀ��������[�N���Ă����o�O���C��(map.c)
+
+ (src/map)
+ pc.c - pc_setsavepoint() �C��
+ map.c - do_final(), map_cache_read() �C��
+
+ (src/char)
+ char.c - search_mapserver() , parse_char() �C��
+
+ (script/npc/etc)
+ npc_etc_pvp.txt - ".gat" ��t������
+
+--------------------
+//1102 by �l������A
+�E�o�O�񍐃X�� >>35-37�ɂ������C����
+�@�ڂ������Ƃ̓X�������Ă�������
+ (src/map)
+ pc.c
+
+--------------------
+//1101 by End_of_exam
+
+�Esocket�֘A�̏C��(socket.c socket.h)
+
+�@1. FIFO�֘A��fd ���s��(fd<=0)�̎��ɂ�����ɓ��삷��悤�ɕύX
+�@2. socket.h �̓�����F�X�Ɛ���
+�@3. make_connection() ���ڑ��Ɏ��s�������ɃG���[��Ԃ��Ȃ��o�O���C��
+�@�@�@���̕ύX�ɍ��킹�āAchrif.c check_connect_char_server() , char.c
+�@�@�@check_connect_login_server() ���C���B����ŃT�[�o�[�]���r���̃o�O��
+�@�@�@���������Ǝv���܂����A�Ĕ�������񍐂����肢���܂��B
+
+�Echar - map �Ԃ̃R�l�N�V������������(char.c chrif.c map.c map.h)
+
+�@1. char - map �Ԃ̃R�l�N�V�������؂ꂽ��Amap �I�ɐڑ����Ă���L������
+�@�@�S�Đؒf����悤�ɂ���B����́A���������̂�����̂ƁAchar�I�Ƃ�
+�@�@�ʐM���K�v�ȏ����i�p�[�e�B�A�M���h�A�y�b�g���j���ł��Ȃ��Ȃ邽�߂ł��B
+�@2. ������map �I�œ����}�b�v��S�����邱�Ƃ�����o�O���C��
+�@3. map �I�̊��蓖�ĕ��@�̌�����
+�@�@������map �I�œ����}�b�v��ǂݍ��߂΁A�ǂꂩ�P�‚������Ă��鎞�ł��A
+�@�@�����map �I�Ƀ��O�C���ł���悤�ɂȂ�܂����B�Ⴆ�΁A�����}�b�v��
+�@�@map�IA��B�ɓǂݍ��܂��Ă����΁AA�������Ă��鎞�ɂ�B�ɁAB�������Ă���
+�@�@���ɂ�A�ɓ]������܂��B�������A�D�揇�ʂ̎w��͂܂��o���ĂȂ��̂ŁA
+�@�@�P�‚�map �I�ɐl�����W����������”\��������܂��B
+
+ (src/map)
+ chrif.c - map �I�̊��蓖�ĕ��@�̌�����
+ map.c - map �I�̊��蓖�ĕ��@�̌�����
+ map.h - map �I�̊��蓖�ĕ��@�̌�����
+
+ (src/char)
+ char.c - map �I�̊��蓖�ĕ��@�̌�����
+
+ (src/common)
+ socket.c - �F�X�C���i��L�Q�Ɓj
+ socket.h - �F�X�C���i��L�Q�Ɓj
+
+--------------------
+//1100 by nyankochan
+�E1098�̏C��
+ (src/map)
+ pc.c
+
+--------------------
+//1099 by End_of_exam
+
+�Emapflag nosave ���s���Ȏ��ɋN���𒆒f������悤�ɂ���(npc.c)
+�Epc_autosave ���Ă΂��񐔂��ُ�ɍ����Ȃ�o�O���C��(pc.c)
+
+pc_autosave() �̓������A
+
+> interval = autosave_interval/(clif_countusers()+1);
+> if(interval <= 0)
+> interval = 1;
+
+�Ƃ������ɂȂ��Ă���̂ŁA�P�}�b�v�T�[�o�[��200�l�̃L�������ڑ����Ă�ƁA
+autosave_interval(def:15 * 1000) / 200 = 0.075 �b���ƂɊ֐����Ă΂�܂��B
+�������ɂ��̏�Ԃ���char�I���������Ȃ�̂ŁA�֐����Ăяo���ŏ��Ԋu��
+0.2 �b�ɕύX���܂����B
+
+ (src/map)
+ pc.c - pc_autosave ���Ă΂��񐔂��ُ�ɍ����Ȃ�o�O���C��
+ npc.c - mapflag nosave ���s���Ȏ��ɋN���𒆒f������
+
+--------------------
+//1098 by nyankochan
+�E���葕���i�̌�1�Œ�
+ (src/map)
+ pc.c
+
+--------------------
+//1097 by End_of_exam
+
+��Ƀo�O�C���ł��B�o�O�񍐂��Ă��ꂽ�F�l�Ɋ��ӁA���ӁB
+
+�EZeny���B�΍�(pc.c trade.c script.c)
+ 1. �����Apc_setparam ��MAX_ZENY �𒴂���ꍇ������o�O���C��
+ 2. �X�N���v�g�ɃI�[�o�[�t���[�΍��lj�
+
+�E���O�C���������E�A�J�E���g�ϐ��X�V���ɖ�������mmo_auth_sync ��
+�@�Ă�ł����̂��^�C�}�[���g�p��������X�V�ɕύX(login.c login_athena.conf)
+
+�Edb�֌W�Ƀo�O������ł���͗l�Ȃ̂ŁA�`�F�b�N�@�\��lj�����(db.c db.h)
+�@�ꕔ�A�J�E���g�̂݃��O�C���s�A�q�Ƀ��X�g�A@who�ŕ\�������L������
+�@�ꕔ������Ȃǂ̃o�O�̌�����db�֘A�ɂ���͗l�ł��B
+�@�udb_foreach : data lost %d of %d item(s)�v�Ƃ������b�Z�[�W���\��
+�@���ꂽ�ꍇ�̓o�O������idb�ɓ����Ă���͂��̃f�[�^���������j�̂ŁA
+�@�񍐂����肢���܂��B
+
+�E������@�Œʏ��苭���L���������Ă��܂��o�O�̏C��(char.c)
+�E�M���h�̖�E���ɕs���ȕ������g����o�O���C��(int_guild.c)
+�E�X�N���v�g���łO�ł̏��Z�����N����������INT_MAX��Ԃ��悤�ɂ���(script.c)
+
+ (conf/)
+ login_athena.conf - autosave_time �̒lj�
+
+ (src/common)
+ db.h - �`�F�b�N�@�\�̒lj�
+ db.c - �`�F�b�N�@�\�̒lj�
+
+ (src/login)
+ login.c - mmo_auth_sync �Ƀ^�C�}�[��K�p
+
+ (src/char)
+ char.c - �ʏ��苭���L���������Ă��܂��o�O�̏C��
+ int_guild.c - �M���h�̖�E���ɕs���ȕ������g����o�O���C��
+
+ (src/map)
+ trade.c - MAX_ZENY �𒴂���ꍇ������o�O���C��
+ pc.c - MAX_ZENY �𒴂���ꍇ������o�O���C��
+ script.c - �I�[�o�[�t���[�΍�A�O�ł̏��Z���̏�����lj�
+
+--------------------
+//1096 by lizorett
+�E�ljz���ɃX�L�������ĂĂ��܂��o�O���C��(�o�O�񍐃X���b�h part8 >>28)
+
+ (src/map)
+ path.c - �ljz���ɃX�L�������ĂĂ��܂��o�O���C��
+
+--------------------
+//1095 by lizorett
+�E�X�N���v�g�̃G�X�P�[�v���f��ύX
+�E�X�L�����j�b�g�O���[�v��group_id�͈̔͂�ύX
+�Eskill_unitsetting()�őS�ẴX�L����skill_get_time()���g�p����悤�ύX
+�E�T�C�g���b�V���[�����j�b�g�X�L������͈͍U�����@�ɕύX(�{�I�d�l)
+
+ (src/map)
+ skill.c - skill_unitgrouptickset_* �� skill_id/group_id���d�Ȃ�Ȃ��悤
+ ��group_id�͈̔͂𐧌�
+ - SkillStatusChangeTable��SC_SAFETYWALL,SC_PNEUMA�lj�
+ - skill_unitsetting()�őS�ẴX�L����skill_get_time()���g�p����
+ �悤�ύX
+ - �T�C�g���b�V���[��͈͍U�����@�ɕύX
+ npc.c - �G�X�P�[�v���f��parse_simpleexpr()�Ɠ��l�ɂ��A�S�p���f���폜
+ (db)
+ skill_cast_db.txt
+ - TS/MS/LoV/FN/SG/HD/GX��upkeep_time��ݒ�
+
+--------------------
+//1094 by End_of_exam
+
+�E�T�u���[�`���Ăяo���\���̒lj�(script.c npc.c npc_convertlabel_db())
+�E�t�A�Z���u�������̒lj�(script.c , DEBUG_DISASM ��L���ɂ��Ă��������B)
+�Eswitch �̈ꎞ�ϐ������ʒu��ύX(script.c)
+�ERERUNLINE�̏Փ��������������̂ŏC��(script.c / h , map.h)
+�E�\�[�X��ǂ݂₷�����邽�߂�buildin_*���t�@�C���Ō�Ɉړ�(script.c)
+�E�V������������\���̃T���v���Ƃ��āu�n�m�C�̓��v��lj�(npc_test_hanoi.txt)
+�Ebuildin_getitemname �C��(script.c , ����X���b�h Part14 >>129-130)
+
+�Ebcc �ŃR���p�C���������ɗ�����o�O���C��(map.c map_id2bl ����)
+�EWindows�ŃR���p�C���������ɁAgettick()�̃L���b�V���������ɂȂ��Ă����̂�
+�@�C��(timer.c , thanks to Shinomori)
+
+ (src/common)
+ timer.c gettick() �̃o�O�C��
+
+ (src/map)
+ script.c �F�X�ύX�i��L�Q�Ɓj
+ script.h struct script_state �C��
+ npc.c npc_convertlabel_db() �ŗ�����̂��C��
+ map.c map_id2bl() ���C��(������̂�bcc �����H)
+ map.h map_session_data �C��
+
+ (doc/)
+ script_ref.txt function �\���̒lj�
+
+ (script/sample/)
+ npc_test_hanoi.txt �n�m�C�̓�
+
+--------------------
+//1093 by ����
+
+�E�T�[�o�[�X�i�b�v�V���b�g
+
+--------------------
+//1092 by lizorett
+�E�������U���̃p�X�����A���S���Y����{�I�Ɠ����ɂȂ�悤�ύX
+�E�X�g�[���K�X�g�A���[�h�I�u���@�[�~���I�����d�˂��ꍇ�A�Е����炾���_���[�W��
+�󂯂�悤�C��(�d�l���s���Ȃ̂Ő�Ɍ��‚������j�b�g����U������悤�ɂ��Ă��܂�)
+�E�A�C�e������‚����Ȃ��ꍇ�A�A�C�e�����g�p���Ă��G�t�F�N�g���\������Ȃ����
+���C��
+�E�Z�[�t�e�B�[�E�H�[���g�p���ɃA�h���X�s���ƂȂ�ꍇ����������C��
+�Emap_getcell/map_setcell�̎d�l�ύX
+�E1085�̃r�b�g�}�b�v�Ή��̍��Ղ̏���
+�E1088�̃A�C�X�E�H�[���̕ύX�������߂�(�{�I�ɍ��킹��)
+�E�S�p���f(npc.c)���C��(For English User Forum >>54)
+
+ (����) map_athena.conf�̃}�b�v�L���b�V���w����s���p�����[�^����ύX���Ă��܂�
+
+ (conf)
+ map_athena.conf - read_map_from_bitmap��read_map_from_cache �ɕύX
+ - map_bitmap_path��map_cache_file�ɕύX
+ (src/map)
+ map.h - �Z���^�C�v���̕ύX(CELL_CHKHIGH,CELL_CHKTYPE)�A
+ �폜(CELL_SET*)
+ - skill_unit_group_tickset�����o���ύX(group_id -> id)
+ - �r�b�g�}�b�v�֘A�̋L�q�̍��Ղ��폜
+ map.c - map_getcell() �Z���^�C�v���̕ύX�Ǝ኱�̃R�[�h�ύX
+ - map_setcell()��1084�ȑO�̎d�l�ɖ߂��ACELL_SETNPC��
+ �t���O��lj�
+ - map_cache�֘A�ׂ̍��ȏC��
+ npc.c - �S�p���f(is_zenkaku)�𐳊m�ɍs���悤�ύX
+ - map_getcell()�̃Z���^�C�v���̕ύX�ɒǏ]
+ pc.c - �A�C�e������‚����Ȃ��ꍇ�A�g�p���̃G�t�F�N�g���\��
+ ����Ȃ������C��
+ - map_getcell()�̃Z���^�C�v���̕ύX�ɒǏ]
+ skill.c - �X�g�[���K�X�g�A���[�h�I�u���@�[�~���I�����d�˂��ꍇ
+ �Е����炾���_���[�W���󂯂�悤�C��
+ - �Z�[�t�e�B�[�E�H�[���g�p���ɃA�h���X�s���ƂȂ�ꍇ��
+ ��������C��
+ - map_getcell()�̃Z���^�C�v���̕ύX�ɒǏ]
+ skill.h - �֐���`�ύX
+ path.c - �������U���̃p�X����������lj�(path_search_long)
+ - map_getcell()�̃Z���^�C�v���̕ύX�ɒǏ]
+ battle.c - �������U���̃p�X�������g�p����悤�ύX
+
+--------------------
+//1091 by End_of_exam
+
+�����@���Ӂ@����
+
+�@����̃p�b�`�͉������e�����G�Ȃ̂ŁA�����͐T�d�ɍs���Ă��������B
+�@status.c / h �ւ̕����́A�֐����̒u�����������ɗ��߂��‚���ł����A
+�@�v��ʃo�O������ł���”\��������܂��B
+
+�E�X�p�Q�e�B�΍�̈�‚Ƃ��āA�X�e�[�^�X�v�Z�A��Ԉُ�Ɋւ�镔����
+�@status.c / h �Ƃ��ĕ����Bbattle.c ����39KB�� , skill.c ����41KB�� ,
+�@pc.c ����38KB���ړ��ł��܂����B���X�����ł����A�X�L���g�p��U���Ȃǂ�
+�@�����̗�����‚��݂₷�����邽�߂ɂ́Abattle.c / skill.c �̒��g��
+�@���炷�K�v������ƍl�������߂ł��B
+
+ battle_get_* => status_get_*
+ skill_status_change_* => status_change_*
+ pc_calcstatus => status_calc_pc
+ pc_calc_sigma => status_calc_sigma
+ pc_getrefinebonus => status_getrefinebonus
+ pc_percentrefinery => status_percentrefinery
+
+�Ebattle.c , script.c �̊����߂��߂�
+�Enpc.c �̉������ύX��߂��A�������NUL ��t��������悤�ɂ���
+�Escript.c �̃~�X�𒼂��ijump_non_zero => jump_zero�@�Ӗ����t�ɂȂ��Ă܂����c�j
+�Eskill.c �̕���C�� �̃R�����g�~�X���C��
+�EWIN32�ŃR���p�C���������A�ő�ڑ��l����60�l���ɐ�������Ă����o�O���C��
+
+ (/)
+ athena.dsw , athena.dsp , bcc32_make.bat , src/login/login.dsp
+ src/char/char.dsp , src/map/map.dsp
+ �R���p�C�������̕ύX
+
+ (src/map/)
+ ��̕����ɍ��킹�ăR���p�C���G���[�̏o�Ȃ��悤�ɏC��
+
+--------------------
+//1090 by Sapientia
+�E�`���b�g�֗̕����̂��߂ɋ��Ԓlj� (�M���h�`���b�g�Ƌ敪���邽�߂ɃE�F�`�M�V�̑O�� [���Ԃ���]���t��)
+�Eatcomand_athena.conf �� onlymes �� 0�Őݒ肵�ĊF�g���悤�Ɋ�����
+ �I���W�i���Ȃ̂Ńf�t�H���g�� GM�����g�����Ƃ��ł���悤�ɐݒ肵�܂���.
+�E@mes [��������] �Ŏg�p
+
+ (src/map)
+ atcommand.c atcommand_charkami �lj�
+ atcommand.h
+ clif.c clif_onlymessage �lj�
+ clif.h
+ (src/conf)
+ atcommand_athena.conf onlymes �lj�
+ help.txt @mes �����lj�
+
+
+--------------------
+//1089 by ��
+�EVC.NET2003�ŃR���p�C������Ƒ�ʂɌx�����o��̂��C��
+�E���̑��o�b�t�@�I�[�o�[�t���[���ׂ̍����o�O�C��
+
+ (src/char)
+ int_guild.c �x���ӏ����C��
+
+ (src/map)
+ atcommand.c, battle.c, clif.c, itemdb.c, pc.c, pc.h, script.c, skill.c
+ �x���ӏ����C��
+ npc.c �x���ӏ��ƃo�b�t�@�I�[�o�[�t���[�C��
+
+--------------------
+//1088 by Sapientia
+�E�E�B�U�h�X�L�� Icewall ���̃L�����N�^�[�⃂���X�^�[�����Ƃɐݒu����邱�Ƃ�h�~
+�E���[�h�i�C�g�X�L�� Berserk �g�p�̎� HP�� 1/3�ɂȂ�Ή񕜂���o�O�C��
+
+ (src/map)
+ pc.c Berserk �C��
+ skill.c Icewall �C��
+
+--------------------
+//1087 by End_of_exam
+
+�E�}�b�v�L���b�V���Ɉ��k�@�\��lj�(1MB���ɏk�܂�悤�ł�)
+�Enpc.c �̊����߂���C��(����X���b�h Part14 , 111)
+�Emap_athena.conf �̃R�����g�A�E�g���C��(Athena�G�k�X���b�hPart7 , 146)
+�EWindows �p�̋N���X�N���v�g��lj����Ă݂�(eAthena �̂����ɉ����j
+
+ (/)
+ win32_start.bat Windows �p�̋N���t�@�C��
+
+ (src/map)
+ map.c ���k�@�\�̒lj�
+ npc.c �����߂���C��
+
+ (src/common)
+ grfio.c decode_zip , encode_zip �̃G�N�X�|�[�g
+ grfio.h decode_zip , encode_zip �̃G�N�X�|�[�g
+
+ (conf/)
+ map_athena.conf �C��
+
+--------------------
+//1086 by End_of_exam
+
+���1085�̃o�O�C��������������܂��B
+�u�Ă߁[�A�P���珑�������₪���āv�Ƃ����˂����݂����͊��ق��Ă��������܂��B
+
+�E�f�[�^�\���̑�ύX(map.c)
+ �}�b�v���폜���lj����Ă������������悤�ɕύX
+ �}�b�v�L���b�V���쐬���ɋ����I������ƍċN�����ɕs����ɂȂ�o�O���C��
+ ���k�t���O�̒lj��i���v����̂��s���Bcompress��^�ɂ���ƁA���݂̃\�[�X��
+ �ǂ߂Ȃ��Ȃ�܂��B�j
+
+�E�Ȃ񂩏Փ������₵������̂ŁA�r�b�g�}�b�v������P�p����(map.c map.h)
+ npc_touch_areanpc : some bug�@����������o���� -> �����s���H
+ ���炭�ʍs�”\���肪�������ݒ肳��Ă��Ȃ����ۂ���ł�����ł��B
+ ��read_map_from_bitmap �̐ݒ���Ȃ��ƃ��O�C�����ɗ�����o�O���C��
+
+�E�L���b�V�����ɑS�Ẵ}�b�v������΁Agrf �����ł����삷��悤�ɕύX�B(grfio.c map.c)
+
+ (src/map)
+ map.c �o�O�C����
+ map.h �o�O�C����
+
+ (src/common)
+ grfio.c �t�@�C�������‚���Ȃ�����exit ���Ă΂Ȃ��悤�ɏC��
+
+--------------------
+//1085 by zalem
+�E�}�b�v�f�[�^�̓ǂݍ��݂̓r�b�g�}�b�v�t�@�C������s�Ȃ���悤�ȋ@�\�lj�
+
+ grf�t�@�C�������x�r�b�g�}�b�v�t�@�C�����쐬���ĈȌ�͂���
+ �쐬���ꂽ�r�b�g�}�b�v�t�H�[�}�b�g�̃t�@�C������}�b�v����ǂݍ���
+ �Ƃ������@���̂邱�Ƃɂ���āAmap-server�������オ�鎞�}�b�v����ǂݎ��
+ �̂Ɋ|���鎞�Ԃ��قƂ�ǂȂ��Ȃ�A�܂�1int��32�‚̃Z����񂪊i�[�ł����
+ �ŁAmap���Ɋւ��郁�����g�p�ʂ��R����߂��܂Ō���̂�(���̂�����
+ ������xCPU�̕��S���傫���Ȃ�)�A�lj����Ă݂��B
+ conf/map_athena.conf��read_map_from_bitmap�I�v�V�����ŗ��p����
+ ���ǂ������w��ł��A���̉��ɂ���map_bitmap_path�Ńt�@�C������ύX����
+ (�f�t�H���g��db/map.info)
+ �܂��e�X�g�i�K�Ȃ̂ŁA�����͂��T�d��(�ꉞLinux�ŁA���낢���
+ �e�X�g���Ă݂���...)
+
+�Emap_getcell()��4�Ԗڈ����̒lj���map_setcell()��4�Ԗڈ����̕ύX
+
+ �֐��̗��p�Ӑ}���킩��₷���悤�ɁA�����Ă��ꂩ��̕ύX��e�Ղɂ���
+ ���߂ɁAmap_getcell()��map_setcell()�̂��ꂼ��4�Ԗڂ̈�����lj��A�ύX���Ă݂��A
+ map_getcell()��4�Ԗڂ̈�����map.h�Œ�`����Ă�CELL_CHK�񋓌^�Amap_setcell()
+ ��4�Ԗڂ̈�����map.h�Œ�`����Ă�CELL_SET�񋓌^���Ƃ�悤�ɕύX.�܂��A���
+ Feature�ɑΉ����邽�߁Amap_getcell()���|�C���^�ɕύX�����B
+
+ ��ȕύX�_�F
+
+ src/map/map.h read_gat(),read_gatp()�}�N���̕ύX
+ �񋓌^ CELL_CHK,CELL_SET��lj�,map_getcell(),map_setcel()�p
+ map_data�\���̂Ƀ����o�[int* gat_fileused[MAX_CELL_TYPE+2]�lj�
+ src/map/map.c map_getcell()���֐��^�|�C���^�ɕύX,map_getcellp()��read_gatp()
+ �̂��߂ɒlj�,���ۂɉ��̎l�‚̊֐��̂ǂ����Ɏw������map_read_flag�ɂ��
+ map_getcell_gat(),map_getcell_bitmap() �lj�
+ map_getcellp_gat(),map_getcellp_bitmap() �lj�
+ map_setcell() �ύX
+ map_createbitmap() �lj�
+ map_readmapfromfile() �lj�
+ map_readallmap() �ύX
+ map_config_read() �ύX
+ do_final() �ύX
+ �ȉ���*.c�t�@�C������map_getcell(),map_setcell(),read_gat(),read_gatp()���ďo�������������ׂĕύX
+ src/map/atcommand.c
+ src/map/mob.c
+ src/map/npc.c
+ src/map/path.c
+ src/map/pc.c
+ src/map/pet.c
+ src/map/skill.c
+
+ conf/map_athena.conf read_map_from_bitmap,map_bitmap_path �lj�
+
+--------------------
+//1084 by lizorett
+�E�o���l�l���̃o�O�C��(�o�O�񍐃X���b�h part7 >>134)
+ (src/map)
+ mob.c �o���l�v�Z�C��
+
+--------------------
+//1083 by End_of_exam special thanks to lizorett����
+�E�\�P�b�g�̃f�X�g���N�^�����̒lj�
+ (common/socket.c common/socket.h login/login.c char/char.c map/clif.c map/chrif.c)
+ �\�P�b�g��‚��鎞�̏����̗��ꂪ�ύX�ɂȂ�܂��B���܂Ń\�P�b�g��‚���ꍇ�́A
+ �܂�session[fd]->eof ��^�ɂ�����A�p�[�Y���[�`�����Ō㏈���i����������Ȃǁj
+ ���Ă��܂����B�ł����Aclose(fd); ���Q�d�Ɏ��s����ăT�[�o�[��������Ȃǂ�
+ �o�O���������Ă�����A�����̗��ꂪ�‚��݂ɂ����Ƃ��������R����Asocket.c ������
+ �S�ď�������悤�ɕύX���܂����B�\�P�b�g��‚��鎞�̎�ȗ���͎��̒ʂ�ł��B
+
+ 1. �\�[�X������session[fd]->eof = 1; ������
+ 2. socket.c ������session[fd]->destruct() ���Ă΂��
+ 3. �������̉�����㏈��(socket.c delete_session����)
+
+ close(fd) �́Asession[fd]->eof = 1; �ɒu�������܂���(#define)�B
+ �܂��Adelete_session() �𖾎��I�ɌĂԕK�v�͂���܂���B
+
+�E�}�b�v�I���z���̃A�C�e��dupe���C��(map/map.c map/pc.c map/chrif.c)
+ �\�P�b�g�ؒf���ɑq�Ƀf�[�^�̃L���b�V���������悤�ɕύX
+ �Q�d���O�C�����Ƀ}�b�v�T�[�o�[��������ꍇ�ɂ��ؒf�ł���悤�ɏC��
+
+�E���o�[�W�������O�C����������map�I��������o�O���C��(map/clif.c)
+ clif_parse() ����
+
+ if(packet_db[cmd].len==0) {
+ -> if(cmd<MAX_PACKET_DB && packet_db[cmd].len==0) {
+
+�Egcc �ŃR���p�C����������timer.c ��warning ���o���̂��C��(common/timer.c)
+ timer.c:116: warning: `check_timer_heap' defined but not used
+
+ (src/common/)
+ socket.c �\�P�b�g�̃f�X�g���N�^������lj�
+ socket.h �\�P�b�g�̃f�X�g���N�^������lj�
+ timer.c warning �C��
+
+ (src/map/)
+ clif.c �\�P�b�g�̃f�X�g���N�^������lj�
+ chrif.c �\�P�b�g�̃f�X�g���N�^������lj�
+ map.c �}�b�v�I���z���̃A�C�e��dupe���C��
+ pc.c �}�b�v�I���z���̃A�C�e��dupe���C��
+
+ (src/char/)
+ char.c �\�P�b�g�̃f�X�g���N�^������lj�
+
+ (src/login/)
+ login.c �\�P�b�g�̃f�X�g���N�^������lj�
+
+--------------------
+//1082 by lizorett (2004/12/18) special thanks to �������l@��������
+�E���n�����{�X�ɖ����ɕύX
+�E1079�̕ύX������NULL�`�F�b�N��lj�
+�E�J�[�h�̌��ʂ����Ȃ��X�L���ɃG���`�����g�f�b�h���[�|�C�Y�����ʂ����Ȃ���
+ ���ɕύX
+�E�G���`�����g�f�b�h���[�|�C�Y���̌��ʂɍ��肪�ڂ�Ȃ��悤�ɕύX
+�E�T�N���t�@�C�X������
+�E�X�g�[���K�X�g�̃m�b�N�o�b�N���X�L���w��ʒu�𒆐S�Ƃ���悤�ύX
+�E�X�L���̎˒���������1�Z�����ꂽ�ꏊ���w�肵�ăX�L�����g���Ɖ����N����Ȃ����
+ ���C��
+�E�o���l�̔z�����C��(�_���[�W��^�����l�����Ȃ��ꍇ��A�Ń_���[�W������ꍇ�Ɍo
+ ���l�����Ȃ��Ȃ��Ă���)
+�E�������Ă��Ȃ��ӏ��ւ̃X�g���b�v�X�L�������s����悤�ύX
+�E�p�b�`�A�b�v�X���b�h Part 6�H��>>116,>>125,>>126 �̃t�@�C����O�̂��߃}�[�W
+
+ (db/)
+ skill_db.txt, skill_cast_db.txt, skill_require_db.txt
+ - �T�N���t�@�C�X�̋L�q���C��/�lj�
+ (src/map/)
+ battle.c - �G���`�����g�f�b�h���[�|�C�Y���̕ύX
+ - �T�N���t�@�C�X�̎���
+ - �X�g�[���K�X�g�̃m�b�N�o�b�N������ύX
+ - ���n�����{�X�ɖ����ɕύX
+ skill.h - SC_SACRIFICE��lj�
+ skill.c - �T�N���t�@�C�X�̎���
+ - skill_castend_damage_id()��MG_FROSTDIVER/MG_STONECURSE��
+ NULL�`�F�b�N��lj�
+ mob.c - �o���l�̔z�����C��
+ script.c - �•ʂɏo����Ă����t�@�C�����}�[�W(>>125)
+ npc.c - �•ʂɏo����Ă����t�@�C�����}�[�W(>>126)
+ (src/common)
+ core.c - �•ʂɏo����Ă����t�@�C�����}�[�W(>>116)
+
+--------------------
+//1081 by End_of_exam
+�E�u���[�v�\���̕����������Ă��������v�Ƃ����v�]�������̂ŁA
+�@for , while , do - while �\���𓱓��B�l�I�ɗ]����v�͖����Ǝv���̂ł����c�B
+
+�Eelse�����S�ɉ�͂ł��ĂȂ������o�O���C���B
+�Eswitch ��break; ���ꏊ�ɂ���Ă̓R���p�C���G���[�ɂȂ�o�O���C���B
+
+ (src/map/)
+ script.c : �\�����g���B�F�X�����B
+
+ (doc/)
+ script_ref.txt : ��̏C���ɍ��킹�ĕύX�B
+
+--------------------
+//1080 by End_of_exam
+
+�E�X�N���v�g�� if - else if - else �\�� , switch �\���ɑΉ������܂����B
+�@���d�l�X�g���”\�ł��̂ŁA���܂ł�茩�₷���X�N���v�g��������Ǝv���܂��B
+�@if(aa) { aaa(); } else if(bb) { cc; if(dd) { ee() } else { ff(); } }
+�@����ɔ����A__ ����n�܂�ϐ��⃉�x����p����ƁA�s�s����������”\��������܂��B
+
+�E�X�N���v�g�ɐV�����֐�(select�֐��Emenu���߂̊֐���)��lj����܂����B
+
+ (src/map/)
+ script.c : �\�����g��
+ npc.c : npc_perse_script �̏C��( { , } �̃l�X�g�ɑΉ� )
+
+ (script/)
+ npc/town/npc_town_alberta.txt : ��J�� goto �������Ă��̂ŏC��
+ sample/npc_debug_pota.txt : switch , select ���g���������
+ (�f�o�b�O�Ɏg�킹�ĖႢ�܂���)
+
+ (doc/)
+ script_ref.txt : ��̏C���ɍ��킹�ĕύX
+--------------------
+//1079 by Yuuki
+�E�Ή����ɃX�g�[���J�[�X���g���ƐΉ�����
+�EFD�ŃX�L���lj����ʂ��g���ƕX�����_���[�W����Ő�Ɋ���Ă�����x�X�����肪����̂ŃX�L���lj����ʂ‚��킸
+�EBB�Ő����Ή��X��������Ȃ��o�O�̏C��(�Ǝ��̃_���[�W����g���Ă��̂ŏ����Đ��K�̃_���[�W����ɖ߂���)
+�E�f�B���C0�̃X�L����adelay/2�lj�(G�I��TS�g���Č��؂������ʍł����ꂪ�߂������ʏ�U�����͂₩�����̂�)
+
+ (src/map)
+ skill.c
+
+--------------------
+//1078 by End_of_exam
+
+�EVisual C++ 6.0 / bcc32 �ŃR���p�C���o����悤�ɏC��(�ʓrzlib.dll ���K�v)
+�E1074�͌��Ԃɂ��܂��B�F�X�Ƃ����f���������������l�т��܂��B
+
+�����@���Ӂ@����
+ ����̃o�[�W�����̊��S�ȓ���m�F�͂��Ă��܂���i�l���ň����ɂ��Ă��������j�B
+ �{�i�I�ȉ^�p�ɓ��ݐ؂�O�ɂ́A�K������m�F������悤�ɂ��Ă��������B
+ �ꍇ�ɂ���ẮA�R���p�C���o���Ȃ��A�s���ȓ���ɂȂ�c���X�̖�肪�N���邩��
+ ����܂��񂪁A���̂Ƃ��́A�������A�Q�Ă��ɁA�l�\�̍~�Ղ�҂‚悤���肢���܂��B
+
+���� ���肢 ����
+ ���̃p�b�`�����S�łɂ��Ă������A�g�p�����|�[�g�𓊍e���Ă��������W���܂��B
+ �p�b�`�����J����‚��łɁA��ʂ�warning ���C�����Ă��ꂽ��������ȁ`�A�Ǝv���Ă݂���B
+
+ (/)
+ bcc32_make.bat , bcc32_clean.bat
+ bcc32 �ŃR���p�C�� / �N���[���@���ȒP�ɂ��邽�߂̃o�b�`�t�@�C���B
+
+ athena.dsp , athena.dsw , src/login/login.dsp , src/char/char.dsp ,
+ src/map/map.dsp
+ Visual C++ �p�̃v���W�F�N�g�t�@�C�� & ���[�N�X�y�[�X
+
+ (src/)
+ �R���p�C���o����悤�ɐF�X�C���B
+
+ (src/common/timer.c)
+ �Ǝ��̎蔲���A���S���Y���i�Q���\�[�g�j���̗p�����o�[�W�����B
+
+--------------------
+//1077 by sylpheed
+�E�T�[�o�[�X�i�b�v�V���b�g
+�E���L��‚���荞��
+����X���b�h Part14-41 Plala����
+�o�O�񍐃X���b�h part7-68 ...����
+
+1074�͎�荞��ł��܂���B
+
+--------------------
+//1076 by mare
+�E�؍����m�̒ʂ�A���X�ƃW���^�X�̃G�T�̕ύX�B
+�EGM�̃A�u���J�^�u����p�X�L���̃t���O�������Ă��̂ŕ����B
+�E�u���b�N�X�~�X�M���h���Ƀv���[�X�g�̏ꍇ�̃Z���t��lj��B
+�E�N���X�`�F���W�őS�Ă̎w��ID�{�X���o��悤�Ɂi�Ȃ��Ă�Ƃ����Ȃ��j
+ (db)
+ pet_db.txt
+ (conf)
+ battle_athena.conf
+ (script/npc/job)
+ npc_job_10blacksmith.txt
+ (src/map)
+ mob.c
+--------------------
+//1075 by kag
+�E�|��p�̎w�т̌��ʎ����̕z��
+�E���ʂ��͂�����Ƃ��Ȃ��̂�item_db�̏C���͂���Ă��܂���B
+�E1075�Ԃł����̂��Ȃ��Ǝv������B
+
+ (db)
+ const.txt
+ bWeponAtk=1073��bWeponAtkRate=1074��lj�
+
+ (src/map)
+ battle.c
+ int battle_get_baseatk()�C��
+ static struct Damage battle_calc_pc_weapon_attack()�C��
+ map.h
+ int weapon_atk[16],weapon_atk_rate[16];
+ SP_WEPON_ATK,SP_WEPON_ATK_RATE, // 1073-1074��lj�
+ pc.c
+ memset(sd->weapon_atk,0,sizeof(sd->weapon_atk));
+ memset(sd->weapon_atk_rate,0,sizeof(sd->weapon_atk_rate));��lj�
+
+ pc_bonus2() �C��
+ (doc)
+ item_bonus.txt
+ bWeponAtk,bWeponAtkRate,bHPDrainValue,bSPDrainValue�@�lj��B
+
+--------------------
+//1073 by LP@@
+�E�A�R�X�L���̈ꕔ�y�уT�C�g�X�L���̏C��(���{�ɂ͍������ɗ��锤�H@2004/12/06)
+���x�����͈ړ����x�����ʂ��A�V�O�i���N���V�X�͐������ADEF�����ʂ̑����ʂ�
+�͂����肵�Ȃ������̂ŘM���Ă��܂���B
+ (src/map)
+ battle.c
+ �f�[�����x�C���A�f�B�o�C���v���e�N�V�����v�Z�����C���B
+ skill.c
+ ���A�t�A�T�C�g�̗L���͈͂��C���i����10x10�����A�t5x5,�T�C�g7x7�j�B
+
+ (db)
+ skill_cast.db
+ �A�N�A�x�l�f�B�N�^�̉r���y�уf�B���C���C���B
+
+//1072 by kag
+�E�]���X�L���𒆐S�ɏC��
+ (src/map)
+ battle.c
+ ���@�͑������X�L�����x��*5%�ɏC���B
+ ����ɖ��ATK�����Ȃ��Ȃ�悤�ɏC���B
+ �I�[���u���[�h�̒lj��_���[�W��100�ɏC���B
+ �o�[�T�[�N�̗^�_�����Q�{�ɂȂ�悤�ɏC���B
+ �w�b�h�N���b�V���̌v�Z�����C���B
+ �X�p�C�����s�A�[�X�̌v�Z�������C���B
+ �v���b�V���[�̌v�Z�����C���B
+ �A�������̌v�Z�����C���B
+ �\�[�h���W�F�N�g�̔��˗����X�L�����x��*15%�ɏC���B
+ �A���[�o���J���̌v�Z�����C���B��̑��������悤�ɏC���B
+ �t�@���R���A�T���g�̌v�Z�����C���B�拭�t���O�łP�_���ɂȂ�悤�ɏC���B
+ �u���b�c�r�[�g���拭�t���O�łP�_���ɂȂ�悤�ɏC���B
+ �f�����X�g���[�V������K���A�J�[�h�����Ȃ��悤�ɏC���B
+ �A�V�b�h�e���[��h�䖳���A�K���A�������A�J�[�h�����Ȃ��悤�ɏC���B
+ skill.c
+ ���@�͑�����0.7�b�̌Œ�r���lj��B
+ LP@@ ����̃A�X���L���G�d���s�‚�lj��B
+
+ (db)
+ skill_db.txt
+ ���C�E���r���W�Q�ł���悤�ɏC���B
+ skill_cast_db.txt
+ �v���b�V���[�̉r���A�f�B���C��lj��B
+ �ҌՍd�h�R�̃f�B���C��lj��B
+ ���C�t�u�������̃f�B���C��lj��B
+ �t�@���R���A�T���g�̉r���A�f�B���C��lj��B
+ �E�C���h�E�H�[�N�̃f�B���C�A�������Ԃ�ύX�B
+ �A���[�o���J���̉r���A�f�B���C��lj��B
+ �N���G�C�g�f�b�h���[�|�C�Y���̃f�B���C��lj��B
+ skill_require_db.txt
+ �I�[���u���[�h�̏���SP���C���B
+ �R���Z���g���[�V�����̏���SP���C���B
+ ���@�͑����̏���SP���C���B
+ �i�p�[���o���J���̏���SP���C���B
+ �v���b�V���[�̏���SP���C���B
+ �T�N���t�@�C�X�̏���SP���C���B
+ �ҌՍd�h�R�̏���SP���C���B
+ ���W�F�N�g�\�[�h�̏���SP���C���B
+
+//1071 by ICO
+�Enpc_job_09wizard.txt,npc_job_16sage.txt���C��
+�E��芪���������n�X�L�����g�p����ۂ̋������C��
+
+ (src/map)
+ mob.c
+ ��芪���̏����n�X�L�����K������^�C�~���O��ύX
+ skill.c
+ �����n�X�L���̔����������C��
+
+//1070 by sylpheed
+�E�h���b�v���̃��[�g���Ƃ̒�����lj�
+ �h���b�v�ݒ�1�`9 10�`99 100�`999 1000�`10000�Ō•ʂɔ{���ƍŒ�/�ō��l�̐ݒ肪�”\�ł�
+�E@weather 0 �������Ȃ��̂��C��
+�E�]���񎟐E��HP/SP25���㏸����
+�h���b�v�{����eAthena�̃A�C�e����ޖ��̐ݒ���ڐA���Ă��ǂ������̂ł���
+��ޖ����ƃ��[�g�̊J�����傫���ꍇ������A���܂�Ӗ����Ȃ�����
+���̂悤�Ȍ`�Ń��[�g�ڍאݒ��lj����Ă݂܂����B
+mob_db��M����y�Ƀh���b�v���̕ύX���ł���Ǝv���܂��B
+
+weather 0�������Ȃ��̂͗��R���ǂ��킩��Ȃ������̂�
+�����悤�ɏC������‚��łɁA�J�t���O��������
+�����o��悤�ɒlj����Ă݂܂����B
+
+�]����HP/SP�Ɋւ��ẮA�]�����Ă��Ă��񎟐E�ɂȂ��ĂȂ��ꍇ
+�����͂��Ȃ��悤�Ȃ̂ŁA���̂悤�Ɏ������Ă݂܂����B
+wedding_modifydisplay: yes �̎��Ƀh���X/�^�L�V�[�h�𑕔����������
+�������������Ă��܂��܂����
+�킩���������C�����肢���܂�orz
+
+ (src/map)
+ atcommand.c
+ @weather�֘A�̏C��(case 0�����s����悤�ɏC��)
+ �J�t���O���������ꍇ�����o��悤�ɂ��Ă݂܂���(JP���Ŏg���邩�s��)
+ (�}�b�v�ړ����Ȃ��ƓV�󂪏����Ȃ��̂�ragexe�̎d�l���ȁH)
+ battle.c
+ battle.h
+ mob.c
+ item_rate_details�֘A��lj�
+ pc.c
+ �]���񎟐E����HP/SP�ő�l25%������lj�
+ �]�����Ă��Ă��񎟐E�łȂ��ꍇ��HP/SP�����͖����̂悤�ł�
+ (conf)
+ help.txt �C��
+ msg_athena.conf 112�lj�
+
+ (doc)
+ conf_ref.txt �C��
+ help.txt �C��
+
+//1069 by lizorett (2004/11/26) special thanks to �������l@��������
+�E�����g�_�E���̎���
+�E���@�͑������r���̂��閂�@�ŗL���ɂȂ�Ȃ����������C��
+�Emap-server���_�E��������̏C��(����X���b�h Part13 >>55)
+�Emap-server�ɕs��ID�Ń��O�C�������char-server���_�E��������̏C��
+�E�T�t���M�E�������r���X�L���Ŏ�������Ȃ������C��
+�E�d�����Ėғŏ�ԂƂȂ�Ȃ��悤�C��
+�E�}�O�i���u���C�N�̃_���[�W���C��
+�E�o�[�T�N����HP/SP�z���A�łȂǂ̃_���[�W���󂯂�悤�C��
+�E��������SP�z���ʂ��������Ă��������C��(�b��)
+�E@help�ɃL�[���[�h�����@�\��lj�
+
+ (src/map)
+ battle.c - �}�W�b�N�p���[�ɂ��MATK�����̎���
+ - ����Z�j���pc_break_equip()�ɏ�������
+ - HP/SP�z�����C��
+ map.h - �����j��̒�`��lj�
+ pc.c - pc_break_armor()/pc_break_weapon()���A�V�K�̑����j���
+ �֐�pc_break_equip()�ɓ���
+ - ���@�͑����̃R�[�h���폜(battle.c�ōs��)
+ - HP/SP�z���֌W�̕ϐ��̏�������lj�
+ pc.h - �֐���`���C��
+ skill.c - �����g�_�E���ɂ�鑕���j�������
+ - ���@�͑����Ɋւ���C��
+ - �d�����Ėғŏ�ԂƂȂ�Ȃ��悤�C��
+ clif.c - map-server���_�E��������̏C��
+ atcommand.c - @help�ɃL�[���[�h������lj�("@help jobchange"�Ȃ�)
+ (src/char)
+ char.c - char-server���_�E��������̏C��
+ (db)
+ const.txt - bUnbreakableHelm, bUnbreakableShield�lj�
+ skill_cast_db.txt
+ - �����g�_�E���̏�Ԉُ펞�Ԃ�ݒ�
+
+//1068 by huge
+�Eatcommand�������‚��lj��ƁAeAthena���炢���‚��ڐA�B(help.txt�Q��)
+�E��GM�L������@�Ŏn�܂锭�����������A���̂܂ܕ\������悤�ɂ����B(GM���x��0�̃R�}���h�͎��s)
+�E�V�C�R�}���h�ɍ��킹�āAmapflag�ݒ�ł���悤�ɁB
+�Escript�������‚��lj��ƁAeAthena�����ˆڐA�B
+�E����HP�{����SP�{����battle_athena�Őݒ�ł���悤�ɂ����B
+�E�S�L�������AGM�ɂ͈ʒu�EHP��ʒm������悤battle_athena�Őݒ�ł���悤�ɂ����B
+�E�h�N���h���b�v�ɂ‚��āAbattle_athena�Őݒ�ł���悤�ɂ����B
+�EGM�̃A�C�e���h���b�v������ɂ‚���GM���x���𐧌��ł���悤�ɂ����B
+�E�f�B�e�N�e�B���O�X�L���C���B
+���f�t�H���g�̓��{�N���C�A���g���ƁA�J�ŗ����܂��B
+
+ (conf/)
+ atcommand_athena.conf �C��
+ battle_athena.conf �C��
+ help.txt �C��
+ msg_athena.conf �C��
+
+ (doc/)
+ help.txt �C��
+ script_ref.txt �C��
+ conf_ref.txt �C��
+
+ (src/map/)
+ atcommand.c
+ atcommnad.h
+ guild.h party.h��ǂޗl�ɏC��
+ is_atcommand() �C��
+ atcommand() �C��
+ ���ڐA�E�V�K�R�}���h�ɂ‚��Ă� help.txt ���m�F���ĉ������B
+ battle.c
+ battle.h
+ hp_rate,sp_rate,hp_meter,bone_drop �lj�
+ clif.c
+ clif.h
+ clif_spawnpc() �C��
+ clif_hpmeter() �lj�
+ guild.c
+ guild.h
+ guild_searchname() �lj�
+ guild_searchname_sub() �lj�
+ map.h
+ �V��Ɋւ���flag�lj�
+ npc.c
+ npc_parse_mapflag() �C��
+ party.c
+ party.h
+ party_searchname() �lj�
+ party_searchname_sub() �lj�
+ pc.c
+ pc.h
+ pc_calcstatus() �C��
+ pc_damage() �C��
+ pc_walk() �C��
+ pc_can_drop() �lj�
+ script.c
+ gmcommand �ڐA�lj�
+ dispbottom �lj�
+ getusersname �lj�
+ recovery �lj�
+ petinfo �lj�
+ checkequipedcard �lj�
+ getexp �폜(set���g���悤�ɂ��ĉ�����)
+ skill.c
+ skill.h
+ skill_castend_pos2() �C��
+
+ �{Athena�G�k�X���b�hPart7 >>54 �������肳��̕�
+ �L�q�R�ꂪ�������炷���܂���B
+--------------------
+//1067 by kai
+�E���f�B�e�C�e�B�I�ɂ��q�[���񕜗ʑ����̌��ʂ��C��
+�E�A�h�o���X�h�J�^�[�������̏C��
+�EPvP���ɂ�����A�X���v�e�B�I�̌��ʂ��C��
+
+ (src/map)
+ skill.c
+ 2120�s�@heal += heal*(skill*2)/100; //���f�B�e�C�e�B�I�̏C��
+
+ battle.c
+ 1723�s�@damage += dmg*(10+(skill * 2))/100; //�A�h�o���X�h�J�^�[�������̏C��
+
+ 2598�`2599�A3580�`3582�s�@�A�X���v�e�B�I�̏C��
+ if(map[target->m].flag.pvp)�Ƃ��_���[�W�v�Z��2/3�ɏC��
+
+--------------------
+//1066 by lizorett (2004/11/17) special thanks to �������l@��������
+�E�f�b�h���[�|�C�Y���쐬����
+�E�G���`�����g�f�b�h���[�|�C�Y������
+�E�\�E���u���C�J�[����
+�Ebattle_weapon_attack�Ŗ��������̒l���߂����o�O�C��
+�E���g�pSP�̕ύX���ׂ̍����C��
+
+ (db)
+ const.txt - �ғ�(SC_DPoison)��lj�
+ item_db.txt - �΃n�[�u,�΃|�[�V����,���\��ɖғł��������ʂ�lj�
+ produce_db.txt - �f�b�h���[�|�C�Y���̍ޗ��̒�`��lj�
+ skill_cast_db.txt�G���`�����g�f�b�h���[�|�C�Y���A�\�E���u���C�J�[
+ �̒�`���C��/�lj�
+ skill_db.txt - �\�E���u���C�J�[/�G���`�����g�f�b�h���[�|�C�Y��/
+ �f�b�h���[�|�C�Y���쐬�̒�`���C��
+ - �i�p�[���o���J���̃q�b�g���C��
+ skill_require_db.txt
+ - �G���`�����g�f�b�h���[�|�C�Y�����Ŗ�̕r���g�p����
+ �悤�ɏC��
+ - �\�E���u���[�J�[/���e�I�A�T���g�̎g�pSP���C��
+ (src/map)
+ battle.h - battle_config.cdp_rate��lj�
+ battle.c - �\�E���u���[�J�[����
+ - ���e�I�A�T���g�ɃJ�[�h���ʂ�������Ȃ��悤�ύX
+ - 4213�s�̏����Ŗ��������̒l���߂����o�O�C��
+ - battle_config.cdp_rate��lj�
+ skill.h - �f�b�h���[�|�C�Y���쐬�̍ޗ���7�‚Ȃ̂ŁA�e�[�u��
+ ��lj��B�ޗ��̍ő吔��define�ŕύX�ł���悤�C��
+ - SC_DPOISON(182)/SC_EDP(183)��lj�
+ skill.c - �ғŌ��ʂ�lj�
+ - �f�b�h���[�|�C�Y���쐬������
+--------------------
+//1065 by End_of_exam
+
+�E�T�[�o�[�]���r���Ɏb��Ώ�
+�Ecalc_index(path.c)�̕s�s�����C��
+
+ (common/)
+ timer.c
+ TIMER_MIN_INTERVEL(�^�C�}�[�̍ŏ��C���^�[�o���j��lj����܂����B
+ ����ɔ����Ado_timer() �̖߂�l�̍Œ�� 10ms ���� 50ms �ɕύX���܂����B
+
+ select��10ms�ȓ��ɏI���Ȃ��‹����ƁA�����X�^�[���ʏ��҂������ȂǂɁA
+ �N���C�A���g����̃p�P�b�g�ɔ������Ȃ��Ȃ�͗l�ł��B
+ ���[�J���e�X�g�i�����X�^�[��ʏ��ҁj�����Ă݂��Ƃ���A25ms�ɕύX�������_��
+ ���P���܂������A�‹��ɂ���Ă�50ms�ł��s�\����������܂���B
+ ���̏ꍇ�́ATIMER_MIN_INTERVEL�𑝂₵�ėl�q�����Ă��������B
+
+ ���l�̌��ۂƂ��āA�����̃N���C�A���g���ڑ�����ƃT�[�o�[���������Ȃ��Ȃ�
+ �Ƃ����̂�����܂����A���̃p�b�`�ɂ���Ă�����x���P����邩������܂���B
+
+ (map/)
+ map.h : MAX_WALKPATH
+ path.c ���� calc_index���s�s�����N����(48*48-1 = 1000 1111 1111(b)) ���߁A
+ MAX_WALKPATH�� 48 ���� 32 �ɕύX���܂����B(32*32-1 = 0011 1111 1111(b))
+
+ #define calc_index(x,y) (((x)+(y)*MAX_WALKPATH) & (MAX_WALKPATH*MAX_WALKPATH-1))
+--------------------
+//1064 by nameless
+�EGCC 3.3.0/3.3.1�������0/0=�ϐ��ő�l�̖��΍�(int:65535/long:4294967294)
+�E���@�h��E�h��E�����h�䂪�������K�p����Ȃ������C��
+�E�i�p�[���o���J����P�̖��@�̃R�[�h�ɏC�����A�􂢌��ʂ�����
+
+ (src/map)
+ skill.c
+ 442�`448�s �s����[<]��[>]�ɏC��
+ 512�`519�s �s����[>]��[<]�ɏC��
+ 529�`538�s �R���p�C���o�O�̒������@�Ɨ�/*�`*/�̕�����
+ gcc�̃o�[�W�����ɍ��킹�Đ���������E������
+ ���Ă��������B3.3.2����͒����Ă���悤�ł�
+ 1857�s �i�p�[���o���J����lj�
+ 660�`664�s �i�p�[���o���J���̎􂢌��ʂ�lj�
+ (src/char)
+ char.c
+ �C��������Ă��Ȃ������������C�����܂����B
+
+--------------------
+//1063 by ����
+�E�������̌��ʎ���
+�E����J�[�h�ɂ��A����U������HP/SP�z�����ʂ��E��ɉe������l�ɏC��(�{�I�d�l)
+ (left_cardfix_to_right��yes�̎��̂݁Bno���Ə]���ʂ�)
+
+ (db)
+ const.txt
+ bHPDrainValue=1071��bSPDrainValue=1072��lj�
+ item_db.txt
+ ��������EquipScript��bonus2 bSPDrainValue,100,3��lj�
+
+ (src/map)
+ battle.c
+ battle_weapon_attack() �C��
+ map.h
+ short hp_drain_value,sp_drain_value,hp_drain_value_,sp_drain_value_;��lj�
+ SP_HP_DRAIN_VALUE,SP_SP_DRAIN_VALUE, // 1071-1072��lj�
+ pc.c
+ pc_bonus2() �C��
+
+--------------------
+//1062 by nameless
+�E�p�P�b�g����M�ł̌둗�M�C��
+�E�o�O�񍐃X���b�h part7 ����̎�荞�݁E�C�� >> 56,57,58
+�Efix1059�̎�荞��
+�E�n�C�E�B�Y�̃l�C�p�[���o���J���̎���(eA��荞��)
+�ECPU�œK���R�[�h�̏C��(athlon�n)�E�lj�(���l��/Linux Zaurus)
+
+ (/)
+ Makefile
+ athlon�n�œK���̏C��
+ ���l��(Kuro-Box 200MHz��[PPC 603x])
+ ���l��(Kuro-Box 266MHz��[PPC 604x])
+ Linux Zaurus (SL-C7xx)
+ �̍œK���R�[�h���L�q
+
+ (db)
+ skill_cast_db.txt
+ 400,500,1200:1600:2000:2400:2500,0,0 //HW_NAPALMVULCAN#�i�p�[���o���J��#
+ (src/map)
+ clif.c
+ clif_parse() �C��
+ (src/char)
+ char.c
+ 1367�s cmd = RFIFOW(fd,0);�lj�
+ (src/map)
+ skill.c
+ switch(skillid)��case HW_NAPALMVULCAN:�ȉ�20�s�قǒlj�
+--------------------
+//1061 by lizorett (2004/11/9)
+�E�s���ȃM���h�X�L���p�P�b�g���󂯂��ꍇ��map/char�T�[�o�������錻�ۂ��C��
+�E�s���ȃp�P�b�g���󂯂��ꍇ��char�T�[�o�������錻�ۂ��C��
+�E���������L�������폜�����char�T�[�o�������錻�ۂ��C��
+�E�”�����‚�����������ԂՔ�����”����ł�ƁA�”��������邽�悤�Ɍ�����
+ (�����O����ƌ�����)�����C��
+�E�X�i�b�`���[�̃X�L�����s��\�����Ȃ��悤�ɂł���ݒ��lj�
+�E�f�{�[�V�����̃��x������(10���x����)��ύX�ł���ݒ��lj�
+
+ (src/common)
+ mmo.h
+ �M���h�X�L����enum��lj�(src/map/skill.h����ړ�)
+ (src/map)
+ skill.h
+ �M���h�X�L����enum���폜(src/common/mmo.h�Ɉړ�)
+ guild.c
+ guild_checkskill �X�L���͈̔̓`�F�b�N��lj�
+ guild_skillup �X�L���͈̔̓`�F�b�N��lj�
+ skill.c
+ skill_additional_effect display_snatcher_skill_fail�̏�����lj�
+ skill_castend_nodamage_id devotion_level_difference�̏�����lj�
+ battle.c
+ display_snatcher_skill_fail,devotion_level_difference�̏�������lj�
+ (src/char)
+ int_guild.c
+ guild_checkskill �X�L���͈̔̓`�F�b�N��lj�
+ mapif_parse_GuildSkillUp �X�L���͈̔̓`�F�b�N��lj�
+ char.c
+ parse_char �s���ȃp�P�b�g���󂯂��ꍇ�ɂ̓_���v����悤�C��
+ char_divorce i<MAX_INVENTORY��j<MAX_INVENTORY�ɕύX
+ (conf)
+ battle_athena.conf
+ display_snatcher_skill_fail,devotion_level_difference��lj�
+--------------------
+//1060 by mosya
+�E�����X�^�[���X�L���r�����ɍ��W�Y�����N���������C��
+�EMOB��AI�ύX�B�O�q���^�Q������Ă���̂ɁA��q�ɍU�������ɂ䂭�̂��C��
+ (src/map)
+ mob.c
+ mob_ai_sub_hard() �ύX
+ mobskill_castend_id() �ύX
+ mobskill_castend_pos() �ύX
+ mobskill_use_id() �ύX
+ mobskill_use_pos() �ύX
+--------------------
+//1059 by SPDFMember
+�EeAthena���Q�l�Ƀ����[�hDB�n����lj����܂����B
+ (conf/)
+ atcommand_athena.conf
+ reloaditemdb
+ reloadmobdb
+ reloadskilldb��lj�
+ help.txt
+ reloaditemdb
+ reloadmobdb
+ reloadskilldb�̐�����lj�
+ msg_athena.conf
+ 89
+ 90
+ 91��lj�
+ (src/map)
+ atcommand.c
+ reloaditemdb
+ reloadmobdb
+ reloadskilldb��lj��B
+ atcommand.h
+ AtCommand_ReloadItemDB,
+ AtCommand_ReloadMobDB,
+ AtCommand_ReloadSkillDB,��lj�
+ itemdb.c
+ static int itemdb_readdb(void);�lj�
+ itemdb.h
+ void itemdb_reload(void);�lj�
+ mob.c
+ void mob_reload(void)�lj�
+ mob.h
+ void mob_reload(void);�lj�
+ skill.c
+ void skill_reload(void)�lj�
+ skill.h
+ void skill_reload(void);�lj�
+--------------------
+//1058 by lizorett
+�E�M���h�q�ɃA�C�e����MAX_STORAGE�ˆȏ゠��Ǝ��o���Ȃ����̂���������C��
+ (src/map)
+ clif.c
+ clif_parse_DropItem item_index/item_amount�͈̔̓`�F�b�N���폜
+ (pc_dropitem �Ń`�F�b�N����)
+ clif_parse_MoveToKafra item_amount�̃`�F�b�N���폜
+ (storage_*storageadd�Ń`�F�b�N����Ă���)
+ clif_parse_MoveFromKafra item_index/item_amount�̃`�F�b�N���폜
+ (storage_*storageget�Ń`�F�b�N����Ă���)
+ pc.c
+ pc_dropitem n/amount�͈̔̓`�F�b�N��lj�
+--------------------
+//1057 by BDPQ��
+�E�E�H�[�^�[�{�[���̃_���[�W��{�I���m�l�������l�ɏC���B
+ [ MATK+SkillLv*30 �� MATK*(1+SkillLv*0.3) ]
+
+ (src/map)
+ battle.c
+ battle_calc_magic_attack �ύX [ 3848�s�ڂ����� ]
+
+--------------------
+//1056 by robert
+���Ԃ���������͕̂s�@���ǂ���
+ (src/map)
+ clif.c
+ clif_parse_DropItem
+ clif_parse_MoveToKafra
+ clif_parse_MoveFromKafra
+--------------------
+//1055 by Nameless
+�E�e��CPU�ɑ΂���R�[�h�œK���I�v�V������ݒ�(�S27��) ��GCC 3.3.1 ����
+�EPentium 3�̃I�v�V������SSE2�ɂȂ��Ă����̂����
+�E�H�}����Arobert�����Packet���̎�荞��(����l�Ɋ���)
+
+ (/)
+ makefile
+ i486/586/p54c/mmx/P3/P4/Cele
+ k6/k6-2/k6-3/athlon�n
+ Via C3(Eden)
+ PowerPC/G4�n
+
+ (src/map/)
+ clif.c
+ clif_parse_MoveToKafra{}
+ �R�[�h��荞��
+
+--------------------
+//1054 by Nameless
+�ECygwin�ŃR���p�C������athena���ڑ�53�`58�l�t�߂Őڑ��s�\�ɂȂ�o�O������
+
+ (src/common/)
+ socket.h
+ #ifdef CYGWIN
+ #undef FD_SETSIZE
+ #define FD_SETSIZE 4096
+ #endif
+ �ȏ�̍s���폜
+ (/)
+ makefile
+ OS_TYPE = -DCYGWIN
+ ��
+ OS_TYPE = -DCYGWIN -DFD_SETSIZE=4096
+ �ɏC��
+
+ #optimize for Athlon-4(mobile Athlon)
+ #CFLAGS += -march=athlon -mcpu=athlon-4 -mfpmath=sse
+
+ #optimize for Athlon-mp
+ #CFLAGS += -march=athlon -mcpu=athlon-mp -mfpmath=sse
+
+ #optimize for Athlon-xp
+ #CFLAGS += -march=athlon -mcpu=athlon-xp -mfpmath=sse
+
+ #optimize for pentium3
+ #CFLAGS += -march=i686 -mcpu=pentium3 -mfpmath=sse -mmmx -msse2
+
+ �e��CPU�̍œK����lj�gcc3.1�ȏ���g���Ă���ꍇ��#���O��
+ �čœK�����s�����Ƃ��ł���Ǝv���܂��B
+
+ ��makefile�ŃZ�b�g���Ă����Ȃ��ƁA�R���p�C���̍ۂɈꕔ
+ FD_SETSIZE���������Ȃ��Ă��܂��o�O(?)������炵���A�ڑ��l����
+ 60�l��Őڑ��s�\���������Ă��܂��܂��B
+
+--------------------
+//1053 by TEILU
+�E�p�P�b�g�p�[�T�[���^�C�}�[�ďo���ɕύX�ł���ݒ�̒lj�
+�E���B�̉”۔���łc�a�ɂǂ̂悤�Ȑݒ�����Ă��A�N�Z�T����
+ ���B�ł��Ȃ������s����C��
+
+ (conf/)
+ map_athena.conf
+ packet_parse_time: 0 �lj�
+ (src/common/)
+ core.c
+ packet_parse_time �lj�
+ main() �ύX
+ socket.c
+ parsepacket_timer() �lj�
+ socket.h
+ parsepacket_timer() �lj�
+ (src/map/)
+ map.c
+ packet_parse_time �lj�
+ map_config_read() �ύX
+ script.c
+ buildin_getequipisenableref() �ύX
+
+--------------------
+//1052 by
+���ꏊ�‚��Ō����R�}���h�lj��B
+ GM�R�}���h�lj�
+ @who+ ���ꏊ�‚�����
+
+ (conf/)
+ atcommand_athena.conf
+ who+: 1 �lj�
+ (/src/common/)
+ version.h
+ Ver 1051->1052 �ύX
+ (/src/map)
+ atcommand.c
+ ATCOMMAND_FUNC(whop); �lj�
+ { AtCommand_WhoP,"@who+",0, atcommand_whop }, �lj�
+ atcommand.h
+ AtCommand_WhoP, �lj�
+--------------------
+//1051 by Plala
+�E�y�R�y�R�R�掞MAX Weight�𑝂₹��悤�ɂ��܂����B
+battle_athena.conf�Őݒ�”\�ł��B
+
+ (conf/)
+ battle_athena.conf
+ riding_weight �lj�
+ (map/)
+ battle.c
+ battle_config.riding_weight �lj�
+ battle.h
+ int riding_weight; �lj�
+ clif.c
+ clif_parse_RemoveOption �ύX
+ pc.c
+ int pc_calcstatus �ύX
+ 1415��sd->max_weight +=battle_config.riding_weight; ��lj�
+ (common/)
+ version.h
+ Ver 1050->1051 �ύX
+--------------------
+//1050 by code
+�E�e��V�󑀍�R�}���h�̌�����
+����������@misceffect�ŌĂяo�����ɊȒP�ɓV�󑀍���s����悤��
+���N���C�A���g�ˑ��͗����t�ł͂Ȃ��J�ł����A�ԈႢ�܂���(^-^;
+
+ (src/common/)
+ version.h
+ Ver 1049->1050 �ύX
+ (/src/map)
+ atcommand.c
+ AtCommand_Rain{} �ύX
+ AtCommand_Snow{} �ύX
+ AtCommand_Cherry{} �ύX
+ AtCommand_Fog{} �ύX
+ AtCommand_Maple{} �ύX
+
+--------------------
+//1049 by code
+�E���A���t��2�‚̓V�󑀍�R�}���h��lj����܂����B
+�������t�Ɋւ��Ă̓N���C�A���g�ˑ��Ȃ̂�jRO���Ɨ����邩���c
+
+ GM�R�}���h�lj�
+ @fog ��
+ @maple ���t
+
+ (conf/)
+ atcommand_athena.conf
+ fog: 1 �lj�
+ maple: 1 �lj�
+
+ msg_athena.conf
+ 87: �����������߂܂����B �lj�
+ 88: �����t���~���Ă��܂����B �lj�
+ (/src/common/)
+ version.h
+ Ver 1048->1049 �ύX
+ (/src/map)
+ atcommand.c
+ ATCOMMAND_FUNC(fog); �lj�
+ ATCOMMAND_FUNC(maple); �lj�
+ { AtCommand_fog,"@fog",0, atcommand_fog }, �lj�
+ { AtCommand_maple,"@maple",0, atcommand_maple }, �lj�
+
+ atcommand.h
+ AtCommand_Fog, �lj�
+ AtCommand_Maple, �lj�
+
+--------------------
+//1048 by code
+�E�J�A��A�T�N�������3�‚̓V�󑀍�R�}���h��lj����܂����B
+���Փ��I�ɒlj����Ă��܂����̂Ńo�O�����邩���m��܂���(��
+
+ GM�R�}���h�lj�
+ @rain �J
+ @snow ��
+ @cherry �T�N������
+
+ (conf/)
+ atcommand_athena.conf
+ rain: 1 �lj�
+ snow: 1 �lj�
+ cherry: 1 �lj�
+
+ msg_athena.conf
+ 84: �J���~��o���܂����B �lj�
+ 85: �Ⴊ�~��o���܂����B �lj�
+ 86: �T�N��������~�点�܂��B �lj�
+ (/src/common/)
+ version.h
+ Ver 1047->1048 �ύX
+ (/src/map)
+ atcommand.c
+ ATCOMMAND_FUNC(rain); �lj�
+ ATCOMMAND_FUNC(snow); �lj�
+ ATCOMMAND_FUNC(cherry); �lj�
+ { AtCommand_rain,"@rain",0, atcommand_rain }, �lj�
+ { AtCommand_snow,"@snow",0, atcommand_snow }, �lj�
+ { AtCommand_cherry,"@cherry",0, atcommand_cherry }, �lj�
+
+ atcommand.h
+ AtCommand_Rain, �lj�
+ AtCommand_Snow, �lj�
+ AtCommand_Cherry, �lj�
+
+--------------------
+//1047 by SVN
+�E�����A�C�e���̐���҂̖��O������map����char�̃p�P�b�g���Ԉ���Ă����̂��C��
+�E��d���O�C������������char-server��������”\�����������̂��C��
+�E�K�[�f�B�A����Gv���ԊO�ɉ��ꂽ�AID�w��̃X�L�������������Askill_unit�ȃX�L���U�������������̂��C��
+�E�O���t�B�e�B��Range���Ƃ肠����3�ɂ��Ă݂�
+ (db/)
+ skill_db.txt
+ (char/)
+ char.c
+ parse_frommap()
+ (map/)
+ clif.c
+ clif_parse_ActionRequest() �ύX
+ clif_parse_UseSkillToId() �ύX
+ mob.c
+ mob_gvmobcheck() �lj�
+ mob.h
+ mob_gvmobcheck() ��`�lj�
+ skill.c
+ skill_attack() �ύX
+
+--------------------
+//1046 by SVN
+��db/packet_db.txt��2004-09-06aSakexe�p�Ȃ̂ŁAjRO�N���C�A���g�Ŏg�p����ۂ́u//jRO�͂����܂Łv�ȉ����R�����g�A�E�g���邩�폜���Ă�������
+
+�E�ύX�_�������̂ŏڍׂ̓t�@�C���A�֐����ƂɋL�q���Ă��܂�
+�E1045�ɂ��̂܂܏㏑�����Ă����삵�܂����A�g���Ȃ��t�@�C���������‚��c��܂�
+�Escript/�ȉ��͖��O���ύX����Ă���t�@�C������ʂɂ���̂�script/�̕ύX�_���Q�l�ɂ��Ă�������
+�E�X�N���v�g�p�̊֐��▽�߂���������d�l���ύX����Ă�����̂�����܂�
+ ��{�I�ɂ͌݊���������͂��ł����Agetgdskilllv()�����͑������𐔎��ł͂Ȃ��X�L����(GD_APPROVAL�Ȃ�)�ɒu��������K�v������܂�
+ getgdskilllv()���g���Ă���/script/npc/gvg_big5/*.* �͒�����ŕK�v�Ȃ��̂ō폜���Ă�������
+ �lj���ύX�Ɋւ��Ă͊T��script_ref.txt�ɔ��f���Ă���܂����A�ڍׂ�script.c�̕ύX�_��ǂ�ł�������
+�E�lj����ꂽ@�R�}���h�ɂ‚��Ă�@help��atcommand.c�̕ύX�_��ǂ�ł�������
+�E�lj����ꂽ�ݒ��conf_ref.txt���Q�Ƃ��Ă�������
+�E�L�q�R��̕ύX�_�����邩������܂���
+
+�lj������t�@�C���́uA�v
+�ύX�����t�@�C���́uC�v
+�폜�����t�@�C���́uD�v
+�ړ������t�@�C���́uM�v
+ /
+ C athena-start
+ ./conf/import �ȉ����N�����Ɏ����쐬����悤�ɕύX
+ seq�R�}���h���g��Ȃ��悤�ɂ���FreeBSD�ł����삷��悤�ɕύX
+ start
+ ���ł�Athena���N�����Ă��鎞�͉������Ȃ��悤�ɕύX
+ exec�� ./ ���_�u���Ă����̂ō폜
+ stop
+ FreeBSD�ł��V�F���ɖ߂�悤�ɕύX
+ kill
+ ����
+ C Makefile
+ PACKETDEF �� PACKETVER=6 ��lj�
+ FreeBSD�𔻒肵�� make �� gmake ��؂�ւ���悤�ɕύX
+ CFLAGS �𕪉����ĘM��₷���悤�ɕύX
+ C start
+ 1�s�ڂ̃V�F���w�肪�������Ȃ������̂�ύX
+ ���ł�Athena���N�����Ă��鎞�͉������Ȃ��悤�ɕύX
+ �N���m�F�̏������� athena-start �Ɠ������ɕύX
+ bin/tool/
+ �V�F���X�N���v�g�̉��s�R�[�h�� CRLF ���� LF �݂̂ɕύX
+ C getlogincount
+ ���O�C���o�[�W������ $loginversion �Ƃ��ĕύX�ł���悤�ɕύX
+ C ladmin
+ �A�J�E���g���Ɂu-�v���g����悤�ɕύX
+
+ conf/
+ D import/
+ �z�z������폜(athena-start start �Ŏ����쐬�����)
+ C atcommand_athena.conf
+ shuffle maintenance misceffect �lj�
+ C char_athena.conf
+ default_map_type default_map_name �lj�
+ C help.txt
+ �����lj�
+ C login_athena.conf
+ login_version login_type �lj�
+ C map_athena.conf
+ npc map �F�X�ύX
+ C mapflag.txt
+ �ŐV�łɍX�V
+ C msg_athena.conf
+ 81�ȍ~�lj�
+ C water_height.txt
+ �ŐV�łɍX�V
+ db/
+ C castle_db.txt
+ �M���h��̎��ɔ������� OnGuildBreak �C�x���g�̂��߂� <Event_Name> �lj�
+ C const.txt
+ GvG�̊J�n���ԓ���ݒ�ł���悤�ɒlj�
+ �}�b�v�t���O mf_notrade mf_noskill �lj�
+ �p�����[�^ PartnerId Cart �lj�
+ �{�[�i�X bBreakWeaponRate bBreakArmorRate bAddStealRate bUnbreakableWeapon bUnbreakableArmor �lj�
+ �X�e�[�^�X�ω� SC_WEDDING �lj�
+ �X�N���v�g���� getgdskilllv �p�� GD_APPROVAL �Ȃǒlj�
+ C exp.txt
+ �]���񎟐E��BaseLv12�ɂȂ�Ƃ��ɕK�v�Ȍo���l��41��481�ɏC��
+ C item_db.txt
+ C mob_db.txt
+ C mob_skill_db.txt
+ C skill_cast_db.txt
+ C skill_db.txt
+ C skill_require_db.txt
+ C skill_tree.txt
+ �ŐV�łɍX�V
+ A packet_db.txt
+ �p�P�b�g��`�t�@�C���lj�
+ doc/
+ C client_packet.txt
+ �V�������������p�P�b�g�������‚��lj�
+ C conf_ref.txt
+ �V�����lj������ݒ�̐�����lj�
+ C db_ref.txt
+ skill_cast_db.txt �� list_hp_rate list_sp_rate �ŕ������w�肵�����̋�����lj�
+ C help.txt
+ conf/help.txt ���l�ɕύX
+ C inter_server_packet.txt
+ �V�K�Œlj������p�P�b�g��lj��Ǝ��ԂƂ����Ă��Ȃ������������C��
+ C item.txt
+ �ŐV�łɍX�V
+ C item_bonus.txt
+ �V�K�Œlj����ꂽ�{�[�i�X��lj�
+ C script_ref.txt
+ �V�K���߂̒lj��Ɗ������߂̕ύX�Ȃ�
+ C serverlink_packet.txt
+ �V�K�Œlj������p�P�b�g��lj��Ɗ����ŏ�����Ă��Ȃ������p�P�b�g�̒lj�
+ script/
+ mob/
+ C npc_monster.txt
+ �ŐV�łɍX�V
+ �j�u���w�C����Mob��npc_parse_mob()�̕ύX�T���v���ɂȂ��Ă܂�
+ npc/
+ �قڂ��ׂĂ�NPC��npc_function.txt���g�������[�U�[��`�֐��ƕ����Ȃǂŏ�������
+ �ړ������t�@�C���Ɋւ��Ă͈ړ���̃t�@�C�����܂܂�Ă���̂ňړ��O�̃t�@�C���̂ݍ폜���Ă�������
+ ��) etc/npc_etc_cTower.txt �͊܂܂�Ă���̂� npc_cTower.txt ���폜
+ M npc_cTower.txt
+ ��etc/npc_etc_cTower.txt
+ A npc_function.txt
+ M npc_pota.txt
+ ��../sample/npc_debug_pota.txt
+ M npc_pvp.txt
+ M npc_pvproom.txt
+ 2�t�@�C������
+ ��etc/npc_etc_pvp.txt
+ M npc_resetJ.txt
+ ��../sample/npc_debug_reset.txt
+ A etc/
+ A npc_etc_gefenia.txt
+ C gvg/
+ ���ׂ�ev_agit_common.txt���g�������[�U�[��`�֐��ŏ�������
+ ���ׂč폜���Ă��炱�̃p�b�`�𓖂ĂĂ�������
+ �M���h���U���ɍԂ�������邽�߂�ev_agit_��.txt��OnGuildBreak�C�x���g��lj�
+ D test/
+ A ev_agit_common.txt
+ D ev_agit_event.txt
+ D TEST_prtg_cas01_AbraiJ.txt
+ D TEST_prtg_cas01_mob.txt
+ D gvg_big5/
+ C job/
+ �]�E�X�N���v�g�̖��O��npc_job_[JOB�ԍ�][�W���u��].txt�ɕύX
+ ���ׂč폜���Ă��炱�̃p�b�`�𓖂ĂĂ�������
+ C quest/
+ M npc_event_arrow.txt
+ ��../../sample/npc_debug_arrow.txt
+ A npc_event_hat2.txt
+ �j�u�����������̐V�������X�N���v�g��lj�
+ src/
+ calloc() realloc() ���ɗ͊e�^�ɃL���X�g����悤�ɕύX
+ calloc() ��� memset() �� \0 �𖄂߂Ă����̂��폜
+ calloc() �Ȃ̂�(�T�C�Y*��,1)�Ŏw�肵�Ă����̂�(��,�T�C�Y)�ɕύX
+ �������m�ۂ��G���[�������܂Ƃ߂��֐��ɏ�������
+ malloc() �� aMalloc()
+ calloc() �� aCalloc()
+ realloc() �� aRealloc()
+ strcpy() �� strncpy() �ɋɗ͕ύX
+
+ char/
+ C char.c
+ �X�y�[�X�ŃC���f���g����Ă����Ƃ�����^�u�œ���
+ A isGM()
+ A read_gm_account()
+ GM�A�J�E���g���K�v�ɂȂ����̂Œlj�
+ C mmo_char_tostr()
+ C mmo_char_fromstr()
+ nullpo�`�F�b�N�lj�
+ C count_users()
+ �K�v�Ȃ�{}���폜
+ C char_delete()
+ null�`�F�b�N�lj�
+ �폜���b�Z�[�W���R���\�[���ɕ\������悤�ɂ���
+ �폜���ɐڑ����Ă���L������ؒf����悤map-server�ɒʒm(0x2b19�p�P�b�g)����悤�ɂ���
+ C parse_tologin()
+ C 0x2713
+ char-server�����e�i���X�ݒ莞��GM�ȊO����Ȃ��悤�ɂ���
+ �ڑ��������ōő�l�ł�GM�͐ڑ��ł���悤�ɂ���
+ C 0x272a
+ 0x2730��0x272a�ɕύX���Ĕԍ����l�߂�
+ �A�J�E���g�폜�������ɃL�������ꕔ������Ȃ������C��
+ A 0x272c
+ ��M����login-server�ɒʒm(0x2b15�p�P�b�g)���ă����e�i���X��ԂɂȂ�悤�ɂ���
+ A char_erasemap()
+ map-server�ؒf���ɑ�map-server�Ƀ}�b�v�̍폜��ʒm(0x2b16�p�P�b�g)����悤�ɂ���
+ ����ɂ�葼map-server�NJ��̃}�b�v�Ɉړ����悤�Ƃ��āA����map-server���ؒf����Ă�����A
+ pc_setpos()�ő��݂��Ȃ��}�b�v�Ƃ������Ƃňړ����悤�Ƃ��Ȃ��Ȃ�̂ŁA
+ �N���C�A���g���u�i���ɂ��҂�����������ԁv�ɂȂ�Ȃ��悤�ɂȂ�܂�
+ C parse_frommap()
+ map-server�ؒf����char_erasemap()�����s����悤�ɂ���
+ map-server�ؒf���ɊNJ��̃}�b�v�ɃL�������c���Ă�����ؒf��map-server�ɒʒm(0x2b17�p�P�b�g)����悤�ɂ���
+ C 0x2afc
+ �F�؎��s���� char_dat[].mapip/mapport �� 0 �ɂ���悤�ɂ���
+ �F�ؐ������� char_dat[].mapip/mapport ��map-server��IP�A�h���X�ƃ|�[�g�ɂ���悤�ɂ���
+ �F�ؐ������ɑ�map-server�ɃL���������O�C���������Ƃ�ʒm(0x2b09�p�P�b�g)����悤�ɂ���
+ C 0x2b02
+ C 0x2b05
+ �R���\�[���ւ̏o�͂Ƀp�P�b�g�ԍ����L�q����悤�ɂ���
+ C 0x2b08
+ �p�P�b�g�d�l��ύX���� account_id mapip mapport ���ʒm����悤�ɕύX
+ map-server�ɐڑ����Ă��Ȃ����͂��ׂ� 0 ������܂�
+ A 0x2b13
+ map-server�N���r���ȂǂŃL���������O�C���ł��Ȃ��悤�ɂ��� server[].active �t���O�𑀍삷��
+ active = 0 �ŃL�����̓��O�C���ł����ɐؒf�����
+ map-server���N�������������Ƃ��� active = 1 �ɂ���p�P�b�g�������Ă���
+ A 0x2b14
+ char-server�������e�i���X��Ԃɂ��� char_maintenance �t���O�𑀍삷��
+ login-server�ɂ��ʒm(0x272b�p�P�b�g)���ă��[���h�I����ʂŃ����e�i���X�\��������
+ �����e�i���X��Ԃł�GM�ȊO�̃��[�U�[�̓��O�C���ł��܂���
+ A 0x2b18
+ �L�����N�^�[�̐ؒf��map-server�ɒʒm(0x2b17�p�P�b�g)����悤�ɂ���
+ C search_mapserver()
+ ������ struct mmo_charstatus *cd ��lj�
+ cd���n���ꂽ���T���Ă���}�b�v���ڑ����Ă���map-server�ɖ��������Ƃ��ɁA�ŏ��Ɍ��‚���map-server�̍ŏ��Ɍ��‚����}�b�v�ɐڑ�����悤�ɂ���
+ ����� char_athena.conf default_map_type: 2 �̎��̋����ł�
+ C parse_char()
+ C 0x65
+ �����e�i���X��Ԃ̎���GM�ȊO��ؒf����悤�ɂ���
+ �ő�ڑ������ݒ肳��Ă��čő�ڑ����̂Ƃ���GM�͐ڑ��ł���悤�ɂ���
+ C 0x66
+ char-server�ɐڑ����Ă���map-server��last_point�����‚����Ȃ������Ƃ��ɁA
+ default_map_type&1 �̎��� default_map_name �ɐڑ�����
+ default_map_type&2 �̎��� �ŏ��Ɍ��‚���map-server�̍ŏ��Ɍ��‚����}�b�v�ɐڑ�����
+ ����ł����‚���Ȃ����͐ؒf����悤�ɂ���
+ �R���\�[���ւ̏o�͂Ƀp�P�b�g�ԍ����L�q����悤�ɂ���
+ C 0x2af8
+ ���}�b�v�ɐڑ����Ă���L��������ʒm(0x2b09�p�P�b�g)����悤�ɂ���
+ C 0x187
+ S 0187�p�P�b�g��ԐM����悤�ɂ���
+ C check_connect_login_server()
+ char_port��WFIFOL�ő����Ă����̂�WFIFOW�ɏC��
+ 80��82�̊Ԃ��󂢂Ă����̂��l�߂ăp�P�b�g����86��84�ɕύX
+ C char_config_read()
+ default_map_type default_map_name ��ǂݍ��ނ悤�ɂ���
+ A gm_account_db_final()
+ �m�ۂ��� gm_account_db �̃��������I�����ɊJ������悤�ɂ���
+ C do_final()
+ inter.c �ȂǑ��t�@�C���̏I������(do_final_*)��lj�����
+ exit_dbn() ��db�p�̃��������J������悤�ɂ���
+ �ڑ�����Ă���map-server�̃Z�b�V�������폜����悤�ɂ���
+ do_final_timer()��timer���I��������悤�ɂ���
+ C do_init()
+ server[].active = 0 �ŏ�����
+ read_gm_account() ��GM�A�J�E���g�t�@�C����ǂݍ��ނ悤�ɂ���
+ C char.h
+ mmo_map_server �� active �t���O��lj�����
+ C int_guild.c
+ C mapif_parse_GuildSkillUp()
+ �M���h�|�C���g������Ȃ��ŃM���h�X�L�����グ�邽�߂� int flag ��lj�
+ C inter_guild_parse_frommap()
+ 0x303C
+ �p�P�b�g��`��ύX����flag��lj�����
+ A guild_db_final()
+ A castle_db_final()
+ A do_final_int_guild()
+ �I�����Ƀ��������J������悤�ɂ���
+ C int_guild.h
+ A do_final_int_guild()
+ ��`��lj�
+ C int_party.c
+ A party_db_final()
+ A do_final_int_party()
+ �I�����Ƀ��������J������悤�ɂ���
+ C int_party.h
+ A do_final_int_party()
+ ��`��lj�
+ C int_pet.c
+ A pet_db_final()
+ A do_final_int_pet()
+ �I�����Ƀ��������J������悤�ɂ���
+ C int_pet.h
+ A do_final_int_pet()
+ ��`��lj�
+ C int_storage.c
+ A storage_db_final()
+ A guild_storage_db_final()
+ A do_final_int_storage()
+ �I�����Ƀ��������J������悤�ɂ���
+ C int_storage.h
+ A do_final_int_storage()
+ ��`��lj�
+ C inter.c
+ �p�P�b�g����`��ύX
+ A mapif_parse_CharPosReq()
+ 0x3090�p�P�b�g�ւ̑Ή�
+ �L�����̈ʒu�v����map-server�ɒʒm(0x3890�p�P�b�g)����
+ A mapif_parse_CharPos()
+ 0x3091�p�P�b�g�ւ̑Ή�
+ �L�����̈ʒu�v���������L�����Ɉʒu����ʒm(0x3891�p�P�b�g)����
+ A mapif_parse_CharMoveReq()
+ 0x3092�p�P�b�g�ւ̑Ή�
+ �v�������L�����܂őΏۂ̃L�������΂��v����ʒm(0x3892�p�P�b�g)������
+ A mapif_parse_DisplayMessage()
+ 0x3093�p�P�b�g�ւ̑Ή�
+ �L�����Ƀ��b�Z�[�W�𑗐M(0x3893�p�P�b�g)����
+ C inter_parse_frommap()
+ �e�lj��p�P�b�g�ւ̑Ή���lj�����
+ A wis_db_final()
+ A accreg_db_final()
+ A do_final_inter()
+ �I�����Ƀ��������J������悤�ɂ���
+ C inter.h
+ A do_final_inter()
+ ��`��lj�
+ C Makefile
+ A nullpo.o nullpo.h ��lj�
+ A malloc.o malloc.h ��lj�
+ common/
+ C db.c
+ A exit_dbn()
+ �I�����Ƀ��������J�����邽�߂ɒlj�
+ C db.h
+ A exit_dbn()
+ ��`�lj�
+ A malloc.h
+ A malloc.c
+ �������m�ۊ֐��̂܂Ƃ�
+ C mmo.h
+ C mmp_charstatus
+ mapip mapport �lj�
+ C guild_castle
+ castle_event �lj�
+ C Makefile
+ A malloc.o malloc.h malloc.c ��lj�
+ C nullpo.h
+ �Â�gcc�ŃR���p�C���ł���悤��\���폜
+ C socket.c
+ C recv_to_fifo()
+ �ėp�������߂邽�߂� read() �� recv() �ɕύX
+ C send_from_fifo()
+ �ėp�������߂邽�߂� write() �� send() �ɕύX
+ C timer.c
+ A do_final_timer()
+ �I�����Ƀ��������J������悤�ɂ���
+ C timer.h
+ A do_final_timer()
+ ��`�lj�
+ login/
+ C login.c
+ A login_version login_type
+ clientinfo.xml�Ŏw�肷�� login_version login_type �Ń��O�C�����K������Ƃ��Ɏg���܂�
+ C parse_fromchar()
+ A 0x272b
+ server[].maintenance �t���O��ύX����
+ �ύX�������e��char-server�ɕԐM(0x272c�p�P�b�g)����
+ C parse_admin()
+ C 0x7932
+ 0x2730��0x272a �ɕύX
+ C parse_login()
+ C 0x64 0x01dd
+ login_version login_type �𔻒肷��悤�ɂ���
+ C 0x2710
+ �p�P�b�g���̒�`���������Ȃ������̂��C������
+ char.c check_connect_login_server �̕ύX�𔽉f
+ C login_config_read()
+ login_version login_type�̓ǂݍ��݂�lj�
+ A gm_account_db_final()
+ C do_final()
+ �I�����Ƀ��������J������悤�ɕύX
+ C Makefile
+ A malloc.o malloc.h ��lj�
+ map/
+ C atcommand.c
+ �R���p�C���I�v�V������memwatch��ǂݍ��߂�悤�ɂ���
+ C atcommand_where()
+ ��map-server�ɂ���L�����̋��ꏊ���\���ł���悤�ɂ���
+ C atcommand_jumpto()
+ ��map-server�ɂ���L�����ɂ���ׂ�悤�ɂ���
+ C atcommand_who()
+ ���[���h���̂��ׂĂɂ���L������\������悤�ɂ���
+ C atcommand_go()
+ �j�u���w�����̈ړ��|�C���g��ύX
+ C atcommand_recall()
+ ��map-server�ɂ���L�������Ăяo����悤�ɂ���
+ A atshuffle_sub()
+ A atcommand_shuffle()
+ PC��MOB�̃V���b�t�����s�� @shuffle ��lj�
+ A atcommand_maintenance()
+ char-server�������e�i���X��Ԃɂ��� @maintenance ��lj�
+ A atcommand_misceffect()
+ ���s�����L��������0x1f3�p�P�b�g�𔭐M���ăG�t�F�N�g��\������ @misceffect ��lj�
+ A atcommand_summon()
+ �R�[���z�����N���X�Ƌ���Ŏw�肵��Mob���������� @summon ��lj�
+ �������ꂽMob�͑���Mob(Pv���ł͓G��PC�܂�)���U�����܂�
+ �������ꂽMob�ɍU�����ꂽMob�͏�������U�����܂�(�o�C�I�v�����g�̃t���[���Ɠ�������)
+ �������ꂽMob��1����ɏ��ł��܂�
+ �l�^�Ȃ̂ʼnB���R�}���h�Ƃ���help.txt�ɂ͋L�q���Ă܂���
+ C atcommand.h
+ �lj�����@�R�}���h�� AtCommandType �ɒlj�
+ C msg_table[] ���O����g����悤�ɂ��邽�߂�extern����
+ C battle.c
+ �R���p�C���I�v�V������memwatch��ǂݍ��߂�悤�ɂ���
+ A battle_config.castle_defense_rate
+ �{�I�Ŗh��l���ǂ̂悤�ɉe�����邩��̓I�ɂ͕�����Ȃ������̂ŁA�Ԃ̖h��l�𔽉f�����闦��ݒ�ł���悤�ɂ���
+ C battle_get_opt1()
+ C battle_get_opt2()
+ C battle_get_option()
+ NPC�̃I�v�V�������Ԃ��悤�ɂ���
+ A battle_get_opt3()
+ opt3��Ԃ��悤�ɒlj�
+ C battle_calc_damage()
+ �ԓ���Mob�ւ̃_���[�W�͖h��l�Ō��Z(�_���[�W*(�h��l/100)*(castle_defense_rate/100))�����悤�ɂ���
+ �K�[�f�B�A���ɂ̓X�L���������悤�ɂ���
+ C battle_calc_pet_weapon_attack()
+ C battle_calc_mob_weapon_attack()
+ C battle_calc_pc_weapon_attack()
+ �x�i���X�v���b�V���[�̃_���[�W�v�Z������悤�ɂ���
+ C battle_weapon_attack()
+ ����U���ɂ�鑦���̎d�l��ύX
+ ����A�Z�j��̊m���v�Z������悤�ɕύX
+ �x�i���X�v���b�V���[�����������悤�ɕύX
+ C battle_check_target()
+ src ����Ȃ��� ss ����party_id guild_id���擾����悤�ɏC��
+ target=BCT_NOENEMY �ȃX�L�� ���J�A�n�~���O�Ȃǂ�PvP�AGvG�̎��ɂ���PC�ɉe������悤�ɂ���
+ Mob��special_ai�Ȃ�Mob��G�Ƃ݂Ȃ��悤�ɂ���
+ C battle_config_read()
+ castle_defense_rate ��ǂݍ��ނ悤�ɂ���
+ C battle.h
+ A battle_get_opt3()
+ ��`�lj�
+ C Battle_Config
+ castle_defense_rate �lj�
+ C chat.c
+ C chat_createnpcchat()
+ ������ int pub ��lj�
+ pub=3 �ł̓`���b�g�̊Ŕ‚�(0/20)�̂悤�ȕ\��������Ȃ��Ȃ�܂�
+ A do_final_chat()
+ �������ĂȂ����ǂƂ肠�����lj�
+ C chat.h
+ C chat_createnpcchat()
+ ��`��ύX
+ A do_final_chat()
+ ��`��lj�
+ C chrif.c
+ �p�P�b�g���e�[�u�����g��
+ C chrif_connect()
+ C chrif_changemapserver()
+ WFIFOL�Ń|�[�g�𑗂��Ă����̂�WFIFOW�ɏC��
+ A chrif_recverasemap()
+ ��map-server���ؒf���ꂽ���Ƃ�char-server���ʒm���ꂽ���ɁA����map-server���Ǘ����Ă����}�b�v�̏����폜����悤�ɂ���
+ A chrif_mapactive()
+ map-server�N����������0�A��������1��char-server�ɒʒm(0x2b13)���ċN���r���Ƀ��[�U�[�����O�C���ł��Ȃ��悤�ɂ���
+ A chrif_maintenance()
+ char-server�������e�i���X��Ԃɂ���������������ʒm(0x2b14)����
+ A chrif_maintenanceack()
+ char-server�������e�i���X��Ԃɂ������̉���
+ �����e�i���X��Ԃɂ����|���}�b�v���ɒʒm����
+ A chrif_chardisconnect()
+ char-server�ɃL�������ؒf���ꂽ���Ƃ�ʒm(0x2b18)����
+ A chrif_parse_chardisconnectreq()
+ char-server����̃L�����ؒf�v�����󂯂āA�ΏۃL����������ꍇ�ɂ͐ؒf����
+ C chrif_parse()
+ C 0x2b09
+ map_addchariddb() �̈��������ɑΉ�
+ A 0x2b15
+ A 0x2b16
+ A 0x2b17
+ A 0x2b19
+ �e�V�K�p�P�b�g�ɑΉ�
+ C check_connect_char_server()
+ �ڑ���char-server��map-server�̏������o�������Ƃ�ʒm����悤�ɂ���
+ A do_final_chrif()
+ �I������char-server�Ƃ̐ڑ����폜����悤�ɂ���
+ C chrif.h
+ A chrif_mapactive()
+ A chrif_maintenance()
+ A chrif_chardisconnect()
+ A do_final_chrif()
+ ��`��lj�
+ C clif.c
+ ���ׂẴp�P�b�g��`�� packet_db ����ǂݍ��ނ悤�ɕύX
+ packet_db.txt��ύX���邱�ƂŁA�x�X�ύX�����؍��N���C�A���g�̃p�P�b�g��`�ɑΉ����₷���Ȃ�܂�
+ packet_len_table[] �� packet_db[].len �ɒu�������܂���
+ <time.h> ��include
+ clif_parse_*��擪�Ő錾����悤�ɂ���
+ clif_parse_*����RFIFO�n�Ŏg���Ă����2������ packet_db[cmd].pos[] �ŕ\�L�����悤�ɂȂ�܂���
+ �p�P�b�g�ԍ��̍ő�l�� MAX_PACKET_DB �Œ�`����悤�ɂ���
+ C clif_set0078()
+ C clif_set007b()
+ �p�P�b�g�̓��e���{�I�ƈ���Ă����̂�guild_emblem_id,manner,opt3�𐳂�������悤�ɕύX
+ C clif_class_change()
+ Mob�ȊO��NPC�ł��g����悤�ɂ���
+ C clif_mob0078()
+ C clif_mob007b()
+ �K�[�f�B�A���ɃM���h�G���u������\������悤�ɕύX
+ C clif_npc0078()
+ ���[�v�|�[�^�����M���h�t���b�O�ɂ���I�v�V������L���ɂ�������map-server������������C��
+ C clif_spawnnpc()
+ NPC�������ł�Hide��Ԃ̎��̓p�P�b�g�𑗂�悤�ɕύX
+ C clif_quitsave()
+ �L�����I������char-server�ɐؒf��ʒm����悤�ɂ���
+ C clif_scriptmenu()
+ C clif_dispchat()
+ C clif_changechatstatus()
+ len��1�o�C�g�lj�
+ C clif_updatestatus()
+ �}�i�[�|�C���g�𑗐M����悤�ɂ���
+ A clif_changestatus()
+ ���͂ɐԃG����Ԃł��邱�Ƃ𑗐M
+ A clif_misceffect2()
+ �G�t�F�N�g�𔭐�������p�P�b�g�𑗐M
+ @misceffect, misceffect���߂Ŏg�p
+ C clif_changeoption()
+ ��Ԉُ펞�ȊO�͏�Ԉُ�A�C�R���\���p�P�b�g�𑗂�Ȃ��悤�ɂ���
+ PC�̎��� clif_changelook() �𑗐M����悤�ɂ���(�����ߏ֕\���p�H)
+ C clif_traderequest()
+ ����p�P�b�g�� 0xe5 �� 0x1f4 �ɉ��Ή�(�{�I�ł̎Z�o���͕s���Ȃ̂łƂ肠���� char_id �𑗐M)
+ C clif_tradestart()
+ ����p�P�b�g�� 0xe7 �� 0x1f5 �ɉ��Ή�(�{�I�ł̎Z�o���͕s���Ȃ̂łƂ肠���� char_id �𑗐M)
+ C clif_getareachar_pc()
+ �}�i�[�|�C���g�������̎��ɂ͐ԃG���\���p�P�b�g�𑗐M����悤�ɂ���
+ C clif_getareachar_npc()
+ NPC��Hide��ԂɑΉ�
+ C clif_getareachar_skillunit()
+ C clif_skill_nodamage()
+ �����̎���heal�𕉐��ɂł���悤�ɂ���
+ C clif_skill_setunit()
+ �O���t�B�e�B�ɑΉ�
+ A clif_item_repair_list()
+ ����C���X�L���ɑΉ����悤�Ƃ������ǃp�P�b�g��������Ȃ��̂œڍ���
+ C clif_produceeffect()
+ map_addchariddb() �̈��������ɑΉ�
+ C clif_guild_skillinfo()
+ �������M���h�X�L�� �J���X�}��\�����Ȃ��悤�ɂ���
+ C clif_callpartner()
+ ���Ȃ��Ɉ������� �g�p���ɑ���̖��O�����Ԃ悤�ɂ���
+ C clif_sitting()
+ ���� fd �͕s�v�Ȃ̂ō폜
+ C clif_GM_kick()
+ �t���O��0�ɂ���悤�ɂ���
+ A clif_wisexin()
+ Wis���ۋ��‚̉����𑗐M
+ A clif_wisall()
+ Wis�S���ۋ��‚̉����𑗐M
+ A clif_soundeffect()
+ SE��‚炷�p�P�b�g�𑗐M
+ soundeffect���߂Ŏg�p
+ C clif_parse_LoadEndAck()
+ ������̃E�F�f�B���O�h���X��^�L�V�[�h�̏�Ԃ����O�A�E�g���Ă�1���Ԃ͌p�������悤�ɂ���
+ �ԃG����Ԃ̓��O�A�E�g���Ă����O�C������������܂��p������悤�ɂ���
+ C clif_parse_QuitGame()
+ C clif_parse_Restart()
+ �I���ł��Ȃ������� pc_isquitable() �ɂ܂Ƃ߂�
+ C clif_parse_GlobalMessage()
+ C clif_parse_Wis()
+ C clif_parse_PartyMessage()
+ C clif_parse_GuildMessage()
+ �ԃG����Ԃł͔����ł��Ȃ��悤�ɂ���
+ C clif_parse_ActionRequest()
+ �M���h�������Ȃǂ̏ꍇ�̓K�[�f�B�A����G���y���E��������Ȃ��悤�ɂ���
+ clif_sitting()�̈����ύX�ɑΉ�
+ C clif_parse_UseItem()
+ �ԃG����Ԃł̓A�C�e�����g���Ȃ��悤�ɂ���
+ C clif_parse_EquipItem()
+ �A�C�e�����j�󂳂�Ă��鎞�͑����ł��Ȃ��悤�ɂ���
+ C clif_parse_TradeRequest()
+ C clif_parse_TradeAck()
+ notrade�}�b�v�ł͎���v���𑗂�Ȃ��悤�ɂ���
+ C clif_parse_UseSkillToId()
+ C clif_parse_UseSkillToPos()
+ C clif_parse_UseSkillMap()
+ noskill�}�b�v�ł̓X�L�����g�p�ł��Ȃ��悤�ɂ���
+ �`���b�g���̓X�L�����g�p�ł��Ȃ��悤�ɂ���
+ �ԃG�����̓X�L�����g�p�ł��Ȃ��悤�ɂ���
+ �E�F�f�B���O��Ԃł̓X�L�����g�p�ł��Ȃ��悤�ɂ���
+ C clif_parse_MoveToKafra()
+ itemdb_isdropable()==0 �͑q�ɂɓ�����Ȃ��悤�ɂ���
+ C clif_parse_GMReqNoChat()
+ GM�E�N���b�N�ŐԃG����t�^�E�����ł���悤�ɂ���
+ C clif_parse_GMReqNoChatCount()
+ �{�I�ł̕ԓ��p�P�b�g���悭������Ȃ��̂ʼn��Ή�
+ �{���̓A�J�E���g�����Ԃ�̂��ȁH
+ C clif_parse_sn_explosionspirits()
+ �N���C�A���g����p�P�b�g���������ɃR���\�[���Ƀ��O��\������悤�ɂ���
+ BaseLv99�ȏ�̎���0�ŏ��Z����”\��������̂����
+ A pstrcmp()
+ clif_parse_wisexin()��qsort()�Ŏg�p
+ A clif_parse_wisexin()
+ Wis���ۋ��‚ɑΉ�
+ A clif_parse_wisexlist()
+ Wis���ۃ��X�g�\���ɑΉ�
+ A clif_parse_wisall()
+ Wis�S���ۋ��‚ɑΉ�
+ A clif_parse_GMkillall()
+ GM�R�}���h/killall(=@kickall)�ɑΉ�
+ A clif_parse_GMsummon()
+ GM�R�}���h/summon(=@recall)�ɑΉ�
+ A clif_parse_GMshift()
+ GM�R�}���h/shift(=@jumpto)�ɑΉ�
+ A clif_parse_debug()
+ packet_db.txt�̃f�o�O�p�ɒlj�
+ �p�P�b�g���e���_���v���܂�
+ C clif_parse()
+ clif_parse_func_table ���폜(packet_db[cmd].func�ɓ���悤�ɂȂ�܂���)
+ A packetdb_readdb()
+ packet_db.txt��ǂݍ��݂܂�
+ �t�H�[�}�b�g�� �p�P�b�g�ԍ�,�p�P�b�g��[,�R�}���h,�R�}���h�����̈ʒu(:��؂�ŕ����w��)]
+ �R�}���h�����̈ʒu�͊e�R�}���h�ɑΉ�����֐����Őݒ肳��Ă���̂�clif.c��ǂ܂Ȃ��ƕ�����Ȃ�����ȃt�H�[�}�b�g�ł�
+ �ύX���ꂽ�p�P�b�g��packet_db.txt�̖����ɒlj����܂�
+ �Â��N���C�A���g�𗘗p����ꍇ�ɂ͕s�v�Ȓ�`�𖖔�����폜����΂悢�悤�ɂ��܂�
+ A do_final_clif()
+ �I�����ɃZ�b�V�������폜����悤�ɂ���
+ C do_init_clif()
+ packet_db��ǂݍ��ނ悤�ɂ���
+ �I�����ɃZ�b�V�������폜�ł���悤�� make_listen_port() �̖߂�l�� map_fd �ɓ����悤�ɂ���
+ C clif.h
+ A MAX_PACKET_DB
+ A struct packet_db
+ A clif_changestatus()
+ A clif_misceffect2()
+ A clif_callpartner()
+ A clif_sitting()
+ A clif_soundeffect()
+ A clif_item_repair_list()
+ A do_final_clif()
+ ��`��lj�
+ C clif_class_change
+ clif_mob_class_change() ����ύX
+ C guild.c
+ C guild_read_castledb()
+ castle_event ��ǂݍ��ނ悤�ɂ���
+ C guild_skillup()
+ ������ύX
+ flag=1 �ŃM���h�|�C���g���g�p���Ȃ��悤�ɂ���
+ C guild_broken()
+ �M���h���U���ɏ��L�Ԃ�j�����邽�߂� OnGuildBreak �C�x���g��lj�
+ A guild_db_final()
+ A castle_db_final()
+ A guild_expcache_db_final()
+ A guild_infoevent_db_final()
+ A do_final_guild()
+ �I�����Ƀ��������J������悤�ɂ���
+ C guild.h
+ C guild_skillup()
+ ��`��ύX
+ A do_final_guild()
+ ��`��lj�
+ C intif.c
+ atcommand.h ��include
+ packet_len_table[] �g��
+ C intif_guild_skillup()
+ ���� flag �lj�
+ A intif_charposreq()
+ �L�����̏ꏊ�v���p�P�b�g�𑗐M
+ flag=1 @jumpto
+ flag=0 @where
+ A intif_jumpto()
+ ��map-server�̃L������ @jumpto �o����悤�ɂ���
+ A intif_where()
+ ��map-server�̃L������ @where �o����悤�ɂ���
+ A intif_charmovereq()
+ �L�������Ăъ񂹂�
+ flag=1 @recall
+ flag=0 ���Ȃ��Ɉ�������
+ A intif_displaymessage()
+ ��map-server�̃L�����Ƀ��b�Z�[�W�𑗂��悤�ɂ���
+ (Wis�ł͂Ȃ��đ�����ςȂ��B@recall �������p)
+ C intif_parse_WisMessage()
+ Wis���ۂ̔��������悤�ɂ���
+ A intif_parse_CharPosReq()
+ �L�����̋��ꏊ��Inter�֕ԓ�
+ A intif_parse_CharPos()
+ �L�����̋��ꏊ��Inter���瑗���Ă����̂�
+ flag=1 �L�����̏ꏊ�ֈړ�(@jumpto)
+ flag=0 �L�����̏ꏊ��\��(@where)
+ A intif_parse_CharMoveReq()
+ �L������������w��ʒu�Ɉړ�������
+ flag=1 @recall �Ȃ̂�GM���x�����r�A���b�Z�[�W��\��
+ A intif_parse_DisplayMessage()
+ �w��L�����Ƀ��b�Z�[�W�𑗐M
+ C intif_parse()
+ �V�p�P�b�g��lj�
+ C intif.h
+ C intif_guild_skillup()
+ ��`�ύX
+ A intif_jumpto()
+ A intif_where()
+ A intif_charmovereq()
+ A intif_displaymessage()
+ ��`�̒lj�
+ C itemdb.c
+ A itemdb_isdropable()
+ �A�C�e�����̂Ă��邩�ǂ����̔��������
+ A itemdb_read_cardillustnametable()
+ grf�t�@�C������ num2cardillustnametable.txt ��ǂݍ���
+ cutincard���߂Ŏg�p
+ C do_init_itemdb()
+ itemdb_read_cardillustnametable() ��lj�
+ C itemdb.h
+ C struct item_data
+ char cardillustname[64] �lj�
+ A itemdb_isdropable()
+ ��`�̒lj�
+ C Makefile
+ A malloc.o malloc.h ��lj�
+ C map.c
+ C struct charid2nick
+ @who�ő�map-server�̃L�������\���ł���悤�� account_id ip port ��lj�
+ C map_freeblock()
+ C map_freeblock_unlock()
+ ��dfree()�΍��NULL��������悤�ɂ���
+ C map_delblock()
+ ���₷���悤�ɌJ��Ԃ��g�p�����ϐ����܂Ƃ߂�
+ C map_addchariddb()
+ charid2nick �̊g���ɂ��킹�Ĉ����𑝂₵��
+ A map_delchariddb()
+ charid_db ����L�������폜(���ۂɂ�ip port��0��)����
+ C map_quit()
+ ������Ԓ��̓��O�A�E�g���Ă�1���Ԃ͏�Ԃ������悤��PC�O���[�o���ϐ� PC_WEDDING_TIME �ɊJ�n���Ԃ��L�^����悤�ɂ���
+ C map_id2bl()
+ ���₷���悤�ɏ�������
+ A map_eraseipport()
+ ��map-server�Ǘ��̃}�b�v�� map_db ����폜����
+ A map_who_sub()
+ A map_who()
+ ��map-server�ɂ���L������ @who �ŕ\�������悤�ɂ���
+ �\����L�������c�邱�Ƃ�����̂͒�����
+ A id_db_final()
+ A map_db_final()
+ A nick_db_final()
+ A charid_db_final()
+ C do_final()
+ �I�����Ƀ��������J������悤�ɕύX
+ C map.h
+ A MAX_WIS_REFUSAL
+ Wis���ۃ��X�g�̕ۑ��ő�l
+ C struct map_session_data
+ C special_state
+ A unbreakable_weapon
+ ���킪��΂ɉ��Ȃ�
+ A unbreakable_armor
+ �Z����΂ɉ��Ȃ�
+ A opt3
+ ��ʊO��������Ă����L�����̏��
+ A areanpc_id
+ OnTouch�C�x���g�����s����NPC��ID
+ A wis_refusal[][]
+ Wis���ۃ��X�g
+ A wis_all
+ Wis�S���ۃt���O
+ A break_weapon_rate
+ ����j��
+ A break_armor_rate
+ �Z�j��
+ A add_steal_rate
+ �lj��X�e�B�[����
+ C struct npc_data
+ A opt1,opt2,opt3,option
+ PC�Ɠ���
+ C u.scr
+ A src_id
+ �I�����̃������J���p
+ C struct mob_data
+ A opt3
+ PC�Ɠ���
+ A guild_id
+ �K�[�f�B�A���ȂǂŎg�p
+ D exclusion_*
+ �֘A�֐����������̂ō폜����
+ C struct map_data
+ C flag
+ A notrade
+ ����֎~�}�b�v�t���O
+ A noskill
+ �X�L���g�p�֎~�}�b�v�t���O
+ �萔�̒lj�
+ SP_PARTNER SP_CART
+ SP_BREAK_WEAPON_RATE SP_BREAK_ARMOR_RATE SP_ADD_STEAL_RATE
+ SP_UNBREAKABLE_WEAPON SP_UNBREAKABLE_ARMOR
+ D talkie_mes[]
+ ��`�폜
+ C map_addchariddb()
+ ��`�ύX
+ A map_delchariddb()
+ A map_eraseipport()
+ A map_who()
+ ��`�lj�
+ C mob.c
+ D mob_exclusion_add()
+ D mob_exclusion_check()
+ �Ӗ�������g�p������Ă��Ȃ��̂�battle_check_target()�ő�p�ł���̂ō폜����
+ C mob_stop_walking()
+ type&4�ŖړI�̏ꏊ�܂ŋ����������1���i��Ŏ~�܂�悤�ɂ���
+ C mob_attack()
+ Mob��Mob���U���ł���悤�ɂ���
+ C mob_target()
+ C mob_ai_sub_hard_slavemob()
+ mob_exclusion_check()���폜
+ C mob_ai_sub_hard_activesearch()
+ C mob_ai_sub_hard()
+ special_mob_ai�ȏꍇ��Mob�����G����悤�ɂ���
+ ���[�g�����X�^�[���ڕW�̃A�C�e���������������͖ړI�̏ꏊ�܂ŕ����Ȃ��悤�ɂ���
+ C mob_damage()
+ �X�t�B�A�}�C��������ꂽ���Ɏ������Ȃ������̂��C������
+ �X�t�B�A�}�C���������Ď������鎞�Ɉړ�����悤�ɂ���
+ src��Mob�̎���src�̃^�[�Q�b�g���O���悤�ɂ���
+ C mob_skillid2skillidx()
+ �C���f�b�N�X��0����n�܂�̂ɃG���[��0��Ԃ����Ă����̂��C������
+ �X�t�B�A�}�C���������Ă��������Ȃ������͂���
+ C mobskill_use()
+ ������Ԃł̓X�L�����g�p�ł��Ȃ��悤�ɂ���
+ C mob_spawn()
+ �K�[�f�B�A���ƃG���y���E�����ԂŔ��������ꍇ�� guild_id ��ݒ�
+ opt3 �� 0 �ŏ�����
+ C mob_can_reach()
+ GvG�ȊO�ł̓K�[�f�B�A���͉������Ȃ��悤�ɂ���
+ C mob_catch_delete()
+ Mob��������Ƃ��̃G�t�F�N�g�� type �Ŏw��ł���悤�ɂ���
+ C mob_timer_delete()
+ �X�t�B�A�}�C���ƃo�C�I�v�����g��������Ƃ��̓e���|�G�t�F�N�g�ŏ�����悤�ɂ���
+ C mob_deleteslave_sub()
+ null�`�F�b�N�O�ɑ�����Ă��镔�����C��
+ C mob_class_change()
+ clif_class_change() �̕ύX�ɑΉ�
+ C mob.h
+ C mob_catch_delete()
+ ��`�ύX
+ D mob_exclusion_add()
+ D mob_exclusion_check()
+ ��`�폜
+ C npc.c
+ C struct npc_src_list
+ A prev
+ �I�����̃������J���p�ɒlj�
+ C npc_checknear()
+ �C�x���gPC�̏ꍇ�ɏ��OK��Ԃ��Ă��Ȃ������̂��C��
+ A npc_enable_sub()
+ npc_enable() ����Ă΂�Ď��͂�PC��OnTouch�C�x���g�����s����
+ C npc_enable()
+ flag �ɂ�鋓����lj�
+ flag=2 NPC��Hide��Ԃ���������
+ flag=4 NPC��Hide��Ԃɂ���
+ Hide���Ă���NPC�͖����ɂȂ�܂�
+ �L���ɂ������� npc_enable_sub() ���ĂԂ悤�ɂ���
+ C npc_event()
+ �G���[����1��Ԃ��悤�ɕύX
+ OnTouch�C�x���g����Ă΂ꂽ�Ƃ��̓C�x���g�����‚���Ȃ��G���[��Ԃ��Ȃ��悤�ɂ���
+ C npc_touch_areanpc()
+ PC���G���A����ʂ������ɉ��x�����s�����̂��C��
+ NPC��OnTouch�C�x���g���������ꍇ�ɂ͎��s����悤�ɂ���
+ �݊�����ۂ‚��߂�OnTouch�C�x���g�������ꍇ�͍��܂łƓ����悤�ɓ����܂�
+ C npc_parse_warp()
+ option,opt1,opt2,opt3 �� 0 �ŏ�����
+ C npc_parse_warp()
+ C npc_parse_shop()
+ ID��npc_get_new_npc_id()�Ŏ擾����悤�ɂ���
+ option,opt1,opt2,opt3 �� 0 �ŏ�����
+ C npc_convertlabel_db()
+ �������m�ی��null���ǂ����m�F���Ă��Ȃ��̂��C��
+ C npc_parse_script()
+ bad duplicate name!�G���[�\�������s����Ă��Ȃ������̂��C��
+ �I�����������J���p��duplicate�� src_id ��}��
+ ID��npc_get_new_npc_id()�Ŏ擾����悤�ɂ���
+ option,opt1,opt2,opt3 �� 0 �ŏ�����
+ C npc_parse_mob()
+ memwatch�΍�Ń��������ꊇ�m�ۂ��Ȃ��悤�ɂ���
+ �����X�^�[���� --ja-- --en-- ���w�肷���mob_db�̖��O���g���悤�ɂ���
+ ID��npc_get_new_npc_id()�Ŏ擾����悤�ɂ���
+ C npc_parse_mapflag()
+ notrade noskill ��ǂݍ��ނ悤�ɂ���
+ A ev_db_final()
+ A npcname_db_final()
+ A do_final_npc()
+ �I�����Ƀ��������J������悤�ɂ���
+ C do_init_npc()
+ ���������J������悤�ɂ���
+ C npc.h
+ A do_final_npc()
+ ��`�̒lj�
+ C party.c
+ A party_db_final()
+ A do_final_party()
+ �I�����Ƀ��������J������悤�ɂ���
+ C party.h
+ A do_final_party()
+ ��`�̒lj�
+ C pc.c
+ A pc_numisGM()
+ account_id��GM���ǂ������f����
+ A pc_isquitable()
+ PC���I���ł����Ԃɂ��邩�ǂ������f����
+ 1��Ԃ��Ƃ��͏I���ł��Ȃ�
+ C pc_counttargeted_sub()
+ Mob��Ԃɂ���Ēl�𐳂����Ԃ��Ȃ��悤�ȋC������̂ŏ��������ύX
+ C pc_makesavestatus()
+ �}�i�[�|�C���g�������̏ꍇ�� 0 �ɂ���
+ C pc_authok()
+ wis_all �� 0 �ŏ�����
+ map_addchariddb() �̕ύX�ɑΉ��Ə�Ɏ��s����悤�ɂ���
+ C pc_calcstatus()
+ break_weapon_rate break_armor_rate add_steal_rate �� 0 �ŏ�����
+ ������Ԃł͕������x�������ɂȂ�悤�ɂ���
+ C pc_bonus()
+ SP_UNBREAKABLE_WEAPON SP_UNBREAKABLE_ARMOR SP_BREAK_WEAPON_RATE SP_BREAK_ARMOR_RATE SP_ADD_STEAL_RATE
+ ������lj�
+ C pc_dropitem()
+ �A�C�e�����̂Ă��邩�ǂ������肷��悤�ɂ���
+ C pc_putitemtocart()
+ �A�C�e�����J�[�g�Ɉړ��ł��邩���肷��悤�ɂ���
+ C pc_steal_item()
+ �X�e�B�[������ add_steal_rate �����Z����悤�ɂ���
+ C pc_walk()
+ C pc_movepos()
+ �͈�NPC�����Ȃ��Ƃ��ɂ� areanpc_id=0 �ɂ���
+ C pc_checkbaselevelup()
+ �X�p�m�r�����x���A�b�v�������ɂ�����X�L���̃��x����{�I�ɂ��킹��
+ C pc_skillup()
+ guild_skillup() �̕ύX�ɑΉ�
+ C pc_damage()
+ �X�p�m�r��Exp99%��HP��0�ɂȂ��HP���񕜂��ċ�����ԂɂȂ�悤�ɂ���
+ C pc_readparam()
+ null�`�F�b�N�O��sd���g���Ă����̂��C��
+ A SP_PARTNER
+ ���������char_id
+ A SP_CART
+ �J�[�g�������Ă���ꍇ��0�ȏオ�Ԃ�
+ C pc_jobchange()
+ �}�i�[�|�C���g�������̏ꍇ�͐ԃG���\������悤�ɂ���
+ A pc_break_weapon()
+ ����j�������
+ A pc_break_armor()
+ �Z�j�������
+ C pc_natural_heal_sp()
+ �X�p�m�r�͔����Ԃł�SP�����R�񕜂���悤�ɂ���
+ A gm_account_db_final()
+ A do_final_pc()
+ �I�����Ƀ������J������悤�ɂ���
+ C pc.h
+ A pc_numisGM()
+ A pc_isquitable()
+ A pc_break_weapon()
+ A pc_break_armor()
+ A do_final_pc()
+ ��`�lj�
+ C pet.c
+ C pet_data_init()
+ C pet_lootitem_drop()
+ �������m�ۂł������ǂ����m�F���Ă��Ȃ������̂ŏC��
+ C pet_catch_process2()
+ mob_catch_delete() �̕ύX�ɑΉ�
+ C script.c
+ �lj������֐��̃v���g�^�C�v��擪�ɒlj�
+ buildin_func[]�ɒlj��������߂�֐���lj�
+ ���Z�q�� C_R_SHIFT C_L_SHIFT ��lj�
+ C parse_subexpr()
+ ���Z�q >> << �lj�
+ C get_val()
+ PC��̂̕ϐ���PC���A�^�b�`����Ă��Ȃ�������G���[���o���悤�ɂ���
+ PC��̂̕ϐ���sd=NULL�������ꍇ�ɂ�pc_read*�Ŏ擾�ɍs���Ȃ��悤�ɂ���
+ A buildin_close2()
+ �X�N���v�g�𒆒f����Close�{�^����\�����܂�
+ C buildin_areawarp_sub()
+ Random�����łȂ�SavePoint�ɂ���΂���悤�ɂ���
+ A buildin_cutincard()
+ �J�[�h�̃A�C�e��ID���w�肷�邱�ƂŃJ�[�h�摜��\�����܂�
+ C buildin_getitem()
+ ������ύX���ĊӒ肵����Ԃœn�����ǂ������w��ł���悤�ɂ���
+ account_id���w�肷�邱�ƂŁA����PC�ɃA�C�e����n����悤�ɂ���(�����p�g��)
+ C buildin_getitem2()
+ account_id���w�肷�邱�ƂŁA����PC�ɃA�C�e����n����悤�ɂ���(�����p�g��)
+ C buildin_readparam()
+ �L���������w�肷�邱�ƂŁA����PC�̃p�����[�^��ǂݎ���悤�ɂ���
+ C buildin_getcharid()
+ �L���������w�肷�邱�ƂŁA����PC�̊֌WID���擾�ł���悤�ɂ���
+ A buildin_getpartymember()
+ �w��ID�̃p�[�e�B�l���̎擾�ƃp�[�e�B�[�����o�[��ID��z��Ŏ擾�ł��܂�
+ A buildin_guildskill()
+ �M���h�X�L�����o���邱�Ƃ��ł��܂�
+ C buildin_getgdskilllv()
+ �M���h�X�L��ID��GD_APPROVAL�̂悤�ȃX�L�����Ŏw�肷��悤�ɂ���
+ A buildin_hideoffnpc()
+ Hide��Ԃ�NPC��\������
+ A buildin_hideonnpc()
+ NPC��Hide��Ԃɂ���
+ C buildin_sc_start()
+ ID�w�肵���L��������Ԉُ�ɂł���悤�ɂ���
+ A buildin_sc_start2()
+ �m���w��ŃL��������Ԉُ�ɂł��܂�(�A�C�X�A���������Ŏg�p)
+ A buildin_getscrate()
+ ��Ԉُ�ϐ����v�Z�����m����Ԃ�
+ C buildin_changebase()
+ ID�Ŏw�肵���L�����̌����ڂ�ύX���邱�Ƃ��ł���悤�ɂ���
+ C buildin_waitingroom()
+ limit=0�̎���(1/10)��\�����Ȃ��悤�ɂ���
+ C buildin_setmapflag()
+ MF_NOTRADE MF_NOSKILL ��lj�
+ C buildin_flagemblem()
+ NPC������ł��Ȃ������Ƃ���map-server������������C��
+ A buildin_getinventorylist()
+ �z��ŏ����i��Ԃ��܂�
+ A buildin_getskilllist()
+ �z��ŏ��L�X�L����Ԃ��܂�
+ A buildin_clearitem()
+ �����A�C�e�����폜���܂�
+ A buildin_getrepairableitemcount()
+ ���Ă���A�C�e���𐔂��܂�
+ A buildin_repairitem()
+ ���Ă���A�C�e�������ׂďC�����܂�
+ A buildin_classchange()
+ NPC���N���X�`�F���W���܂�
+ A buildin_misceffect()
+ �G�t�F�N�g��\�����܂�
+ A buildin_soundeffect()
+ �w�肵��SE��‚炵�܂�
+ C op_2num()
+ C run_script_main()
+ �V�t�g���Z�q��lj�
+ A mapreg_db_final()
+ A mapregstr_db_final()
+ A scriptlabel_db_final()
+ A userfunc_db_final()
+ C do_final_script()
+ �I�����Ƀ��������J������悤�ɂ���
+ C skill.c
+ <timer.h> intif.h ��include
+ �R�����g�̃X�L������jRO�d�l�ɏ�������
+ C SkillStatusChangeTable[]
+ �x�i���X�v���b�V���[ �O���t�B�e�B ���� ����2 ��lj�
+ C skill_additional_effect()
+ �x�i���X�v���b�V���[�lj�
+ �A���N���X�l�A���폜
+ C skill_attack()
+ �`���b�g���ɃX�L�����e�����Ȃ��悤�ɂ���(�`���b�g�L�����Z��)
+ �x�i���X�v���b�V���[��SkillLv=-1��clif_skill_damage()����悤�ɂ���
+ �����̓_���[�W�\�����Ȃ��悤�ɂ���
+ C skill_castend_damage_id()
+ �A�V�b�h�e���[�ŕ���j�������悤�ɂ���
+ �x�i���X�v���b�V���[��3*3�͈͍̔U��������悤�ɂ���
+ �����̏�����ύX����
+ C skill_castend_nodamage_id()
+ sd��dstsd��PC���ǂ����𔻒肷��悤�ɂ���
+ �X�p�m�r�̉ł��q�[�����g���Ɖ񕜗ʂ�2�{�ɂȂ�悤�ɂ���
+ clif_sitting()�̕ύX�ɑΉ�
+ ����C���̓p�P�b�g��������Ȃ��̂ŃR�����g�A�E�g
+ �X�g���b�v�`�A�P�~�J���`���X�L�����j�b�g�Ɏg�p�����ꍇ�Amap-server������������C��
+ �N�����͌���A���Ȃ��ׂ̈ɋ]���ɂȂ�܂��̌v�Z��MAX_HP�܂���MAX_SP���炷��悤�ɂ���
+ ���Ȃ��Ɉ������� �𑊎�̖��O�����ԁA�����ݒu�ł��Ȃ����A�{�I���ɂ���
+ �A���N���X�l�A��PC�������������Ă��鎞�Ƀ����[�u�g���b�v���Ă�PC��������悤�ɂȂ�Ȃ������̂��C��
+ �A���R�[�������Ԃ悤�ɂ���
+ �x�i���X�v���b�V���[����������
+ �����Ŏ�����Ԃ��J�n����悤�ɂ���
+ C skill_castend_pos2()
+ �o�C�I�v�����g�A�X�t�B�A�}�C��
+ �p�P�b�g���Ԃ�ύX
+ �w�肵���ꏊ�ɐݒu����悤�ɂ���
+ ���ʎ��Ԃ�skill_cast_db.txt�Ŏw�肷��悤�ɂ���
+ mob_exclusion_add()���폜
+ �O���t�B�e�B�������A1�‚����u���܂���
+ C skill_castend_map()
+ ���[�v�|�[�^���͎��ۂ̐ݒu���Ƀu���[�W�F���X�g�[���������悤�ɂ���
+ C skill_unitsetting()
+ �O���t�B�e�B�̃X�L�����j�b�g��1�‚ɏC��
+ �g�[�L�[�{�b�N�X�A�O���t�B�e�B�̕������ sd->message �Ɋi�[����悤�ɂ���
+ C skill_unit_onplace()
+ �`���b�g���̓X�L�����j�b�g�����삵�Ȃ��悤�ɂ���(�`���b�g�L�����Z��)
+ �A���N���X�l�A�ɂ����鏈����skill_additional_effect()����ړ�
+ ���[�v�|�[�^���ɏp�҂�������������悤�ɂ���
+ �f�����X�g���[�V�����ɂ�镐��j�������悤�ɂ���
+ �A���N���X�l�A�A�X�p�C�_�[�E�F�b�u�Ń������A�N�Z�X�ᔽ���N����”\�����������̂��C��
+ C skill_unit_onout()
+ �A���N���X�l�A�Łu}�v������Ȃ��������߂ɋ߂���ʂ肩������������1�b��㩂ɖ߂��Ă��܂����̂��C��
+ C skill_unit_onlimit()
+ ���[�v�|�[�^�������O�̏������폜
+ ���Ȃ��Ɉ���������map-server�ɂ��Ă��Ăׂ�悤�ɂ���
+ A skill_check_condition_mob_master_sub()
+ �}�b�v���œ���PC����o���o�C�I�v�����g��X�t�B�A�}�C���̐��𐔂���
+ C skill_check_condition()
+ hp_rate��sp_rate�ɕ������w�肷��Ə���v�Z��Max�l���炷��悤�ɂ���
+ ���Ȃ��Ɉ����������������Ă��Ȃ���ԂŎg������g�p���s��\������悤�ɂ���
+ �o�C�I�v�����g�ƃX�t�B�A�}�C���̐ݒu����skill_cast_db.txt�Őݒ�ł���悤�ɂ���
+ �t�@�C�A�[�E�H�[���̐������� skill_use_pos() ����ړ�
+ C skill_use_id()
+ �o�W���J��GvG�ł͎g�p�ł��Ȃ��悤�ɂ���
+ �x�i���X�v���b�V���[�͑Ώۂ��ŏ�ԂłȂ���Ύg�p���s
+ C skill_use_pos()
+ �t�@�C�A�[�E�H�[���̐������� skill_check_condition() �Ɉړ�
+ C skill_status_change_end()
+ opt3�̏�����lj�
+ ������Ԃ̏I����lj�
+ �x�i���X�v���b�V���[��lj�
+ ������lj�
+ C skill_status_change_timer()
+ ������ԂƐԃG����Ԃ̃^�C�}�[�Đݒ��lj�
+ ������Ԃł�1�b���Ƃɑ��x���ω�����悤�ɂ���
+ C skill_status_change_start()
+ opt3�̏�����lj�
+ �O���t�B�e�B�͒lj��Œu������O�̂͏�����悤�ɂ���
+ ������ԂƐԃG����Ԃ�lj�
+ �O���t�B�e�B�͏�Ԉُ�J�n���ɃX�L�����j�b�g��ݒu����悤�ɂ���
+ �x�i���X�v���b�V���[�͓��ɉ����lj��͂Ȃ�
+ �����͉r���p�P�b�g�������ő���悤�ɂ���
+ C skill_status_change_clear()
+ opt3�̏�����lj�
+ C skill_unit_timer_sub()
+ ���[�v�|�[�^�������O�����Ԑ؂�ɂȂ�Ƃ��Ɍ����ڂ�ύX���Ė{�I�̂悤�Ɍ��ʉ����o��悤�ɂ���
+ �u���X�g�}�C���ȊO��㩂͎��Ԑ؂��㩂ɖ߂�悤�ɂ���
+ C skill.h
+ ��Ԉُ�ɃX�L�����������‚��‚�����A�V�K�̏�Ԉُ�𑝂₵��
+ C storage.c
+ A storage_db_final()
+ A guild_storage_db_final()
+ C do_final_storage()
+ �I�����Ƀ��������J������悤�ɂ���
+ C trade.c
+ C trade_tradeadditem()
+ C trade_tradecommit()
+ itemdb_isdropable()�Ō����ł��Ȃ��A�C�e���𔻒肷��悤�ɂ���
+ C vending.c
+ vending_purchasereq()
+ ���z�v�Z��double�ł���悤�ɂ���int�Ō����ӂꂵ�Ȃ��悤�ɂ���
+
+--------------------
+//1045 by TEILU
+
+�E�X�e�B�[���A�X�e�B�[���R�C���A�X�i�b�`���[�̎��s���b�Z�[�W��
+ ���x�����P�`�X�̎��ɕς������̂ŏC���B
+ (map/)
+ skill.c
+
+�E���B�̉”ۂ����T�C�g�����ɂc�a�ɐݒ�B�i��������rusi����쐬�����g�p�j
+ (db/)
+ item_db.txt
+
+�E�t�@�C�A�[�E�H�[�����������𒴂����Ƃ��ɃX�L���g�p���s��
+ �o��^�C�~���O��ύX�B
+ (map/)
+ skill.c
+
+�E�A�u���J�^�u����p�X�L����gm_all_skill�ݒ莞�ɕ\���ł���悤�ɕύX�B
+ battle_athena.conf��gm_all_skill_add_abra��yes��ݒ肷���
+ �X�L�����X�g�ɕ\�������悤�ɂȂ�܂��B
+ (conf/)
+ battle_athena.conf
+ (db/)
+ skill_require_db.txt
+ (map/)
+ battle.c
+ battle.h
+ pc.c
+
+--------------------
+//1044 by TEILU
+
+�E1042��@itemidentify�̌����̐ݒ��Y��Ă����̂Œlj��B
+ (conf/)
+ atcommand_athena.conf
+
+�E�X�e�B�[���A�X�e�B�[���R�C���A�X�i�b�`���[�̎��s����
+ ���s���b�Z�[�W��\������悤�ɕύX�B
+ (map/)
+ skill.c
+
+�E�A�C�e���c�a�ɐ��B�”ۃt���O�̃J������lj�
+ ���B�̉”ۂ��c�a���Q�Ƃ���悤�ɏC��
+ ���Ƃ肠�������i�A���i�A�����i�̓������ƃA�N�Z�T���ȊO��
+ �����i�͂��ׂĐ��B�‚̐ݒ�łc�a�����܂����B
+ �c�a�͏C�����K�v�ɂȂ�܂��B
+ (db/)
+ item_db.txt
+ (map/)
+ itemdb.c
+ itemdb.h
+ script.c
+
+--------------------
+//1043 by dusk
+�Edoc�t�H���_�Econf�t�H���_����help.txt��1042(TEILU����)�̐����lj�
+ @itemidentify�̐����͂V�Q�s�ڂ�@itemreset�̉��ɁB
+
+�EValkyrie Realms 5 (�E��)�̊��̏C��
+ Valkyrie Realms 5 (�E��)�̊�������Ɩ��擾��ԃR�����g�΂�����o�Ă����̂�
+ �����Ɗm�F�ł���悤�ɁB
+ �� Valkyrie Realms�̊e�Ԃɖ߂���Ƃ͈Ⴂ�܂��B
+ prtg_cas05.txt���̃M���h�_���W�����ɓ��郌�o�[�ȊO��
+ getcastledata "prtg_cas05.gat",1,@GIDp5;��
+ set @GIDp5,getcastledata("prtg_cas05.gat",1);�ɏC���B
+
+--------------------
+//1042 by TEILU
+
+�E@heal�R�}���h�ɉ����n���Ȃ��Ɗ��S�񕜂���悤�ɕύX�B
+ (map/)
+ atcommand.c
+
+�E@itemitemidentify�R�}���h�̒lj�
+ ���Ӓ�̏����A�C�e����S�ĊӒ肵�܂��B
+ (conf/)
+ msg_athena.conf
+ (map/)
+ atcommand.c
+ atcommand.h
+
+--------------------
+//1041 by mare
+ FIX NPC Script Command - buildin_getgdskilllv()
+ Add NPC Sctipt Command - buildin_agitcheck()
+ (script/npc/job/)
+ npc_job_wizard.txt
+ ���E��������̑䎌�A�m�r�ƃv���̏ꍇ�̕��lj�
+-------------------
+//1040 by �Ӓ���
+
+�E�T�[�o�[�Ԑڑ��̃p�P�b�g�\�lj�
+ (doc/)
+ serverlink_packet.txt
+ inter<->map �ȊO�̃T�[�o�[�Ԑڑ��̃p�P�b�g�\
+
+�E�d�l�X���� Login_ID2 �֌W�ł��ɂ傲�ɂ�
+�E�T�[�o�[�Ԑڑ��̃p�P�b�g�ꕔ�ύX
+ (login/)
+ login.c
+ auth_fifo �� ip �����o�lj�
+ �p�P�b�g�ύX�ɔ����ύX��
+ (char/)
+ char.c
+ auth_fifo �� login_id2, ip �����o�lj�
+ �p�P�b�g�ύX�ɔ����ύX��
+ (map/)
+ chrif.c
+ chrif_authok()�lj�
+ �p�P�b�g�ύX�ɔ����ύX��
+
+�E�����ċN���X�N���v�g start �ɃR�����g�ŊȒP�Ȑ����lj�
+ start
+ �R�����g�lj�
+
+--------------------
+//1039 by Ni+S
+ �E�M���h�֌W�̃X�N���v�g
+ ���L�҂̋��Ȃ��A�W�g����A�M���h�ɏ������ĂȂ��L�����Ȃ�
+ �M���h�_���W�����ɓ���Ă��܂��Ƃ����s�������܂���
+
+ ����́A���L�҂̋��Ȃ��A�W�g�̒l��0�ł���A
+ getcharid(2)�ŃM���hID��Ԃ��̂ł����A
+ �M���h�ɏ������Ă��Ȃ��L������getcharid(2)��0��Ԃ��ׁA
+ �l����v���Ă��܂��N�����Ă������ۂł���
+ �������L����������Ȃ��悤�ɏC�����܂���
+
+ �E�t�@�[�}�V�[/�|�[�V�����쐬DB
+ ���b�h�X�����|�[�V����
+ �C�G���[�X�����|�[�V����
+ �z���C�g�X�����|�[�V����
+ �̍ޗ����A��̃|�[�V�����r���玎���ǂɏC��
+
+--------------------
+//1038 by Plala
+�E�]�ENPC�֘A�̏d��ȃo�O�C��
+ (script/npc/job)
+ npc_job_aco.txt �C��
+ npc_job_merchant.txt �C��
+ npc_job_thief.txt �C��
+
+ �E��LNPC�œr���܂ŃN�G�X�g��i�߂đ��̐E�ɓ]�E����ƁA
+ �Ăѓ]�E�”\�������_���C�����܂���
+
+
+--------------------
+//1037 by �Ӓ���
+
+** FOR ENGLISH DEVELOPERS **
+DO NOT UPLOAD IF YOU DON'T USE JAPANESE ENCODE (SHIFT-JIS) !
+WHY WE(JAPANESE) REPAIR ERROR CHARACTER AFTER EVERY YOUR UPLOADING ?
+BREAKING IS EASY, REPAIRING IS VERY DIFFICULT !
+
+** �p�ꌗ�̊J���҂̕���(���{���) **
+���{��G���R�[�h(�V�t�gJIS)���g���C�������Ȃ�A�b�v���[�h���Ȃ��Ă��������I
+�Ȃ���X�i���{�l�j�����Ȃ����̃A�b�v���[�h�̂��тɕ��������𒼂��Ȃ���΂Ȃ�Ȃ���ł����H
+�󂷂̂͊ȒP�ł����A�����̂͂ƂĂ������ł��I
+
+�E���������������ŏC��
+ (map/)
+ script.c
+
+�Eladmin��POSIX�K�{�ɁBDigest::MD5�������Ă����s�ł���悤�ɏC��
+�Eserverstatus.cgi�ŁANet::Ping�������Ă����s�ł���悤�ɏC��
+ (bin/tool/)
+ ladmin
+ (bin/tool/cgi/)
+ serverstatus.cgi
+
+�Escript_ref�Ŕ����Ă���̂ł킩����̂��C��
+ ���̂�script_ref���甲���Ă����(getarg�Ȃ�)�̈ꕔ���Ăђlj�
+ ** �A�b�v���[�h����Ƃ��͍ŐV�p�b�`����̍������A�b�v���[�h���܂��傤 **
+ (doc/)
+ script_ref.txt
+
+�Eaccount_making.txt�C��
+ ladmin�X�N���v�g�̃p�X
+ (doc/)
+ accoun_tmaking.txt
+
+--------------------
+//1036 by Michael
+�E�lj� Script Command:
+ getequipid(EquipPos); EquipPos: 1-10
+ gettimetick(Type); Type: 0 SystemTick, 1 TimeSecondTick(0-86399)
+ gettime(Type); Type: 1 Sec, 2 Min, 3 Hour, 4 Weekday, 5, Monthday, 6 Month, 7 Year
+ gettimestr("TimeFMT", Len); TimeFMT: Time format strinf / Len: String Length
+
+ (map/)
+ script.c
+ buildin_getequipid(); �lj�
+ buildin_gettimetick(); �lj�
+ buildin_gettime(); �lj�
+ buildin_gettimestr(); �lj�
+
+--------------------
+//1035 by Michael
+�E�lj� GVG Script NPC edit from Aegis NPC(Chinese-big5 version), Please someone translate to Japanese.
+�E�C�� NPC Script Command - buildin_getgdskilllv()
+ getgdskilllv(Guild_ID, Skill_ID);
+
+ (map/)
+ script.c
+ buildin_getgdskilllv() �C��
+
+--------------------
+//1034 by (Pepermint)
+ FIX NPC Script Command - buildin_getgdskilllv()
+ Add NPC Sctipt Command - buildin_agitcheck()
+ (map/)
+ script.c
+ buildin_getgdskilllv() �C��
+ buildin_agitcheck() �lj�
+
+--------------------
+//1033 by Michael
+�E�lj� NPC Script Command - buildin_getgdskilllv()
+ getgdskilllv(Guild_ID, Skill_ID);
+ skill_id = 1:GD_APPROVAL,2:GD_KAFRACONTACT,3:GD_GUARDIANRESEARCH,4:GD_CHARISMA,5:GD_EXTENSION
+
+ (map/)
+ script.c
+ buildin_getgdskilllv() �lj�
+
+--------------------
//1032 by (��)
�E1031�ʼn��̂��폜����Ă���buildin_getitemname()�𕜊�
�E�o�O�X���Ȃǂɏo���C���𔽉f
@@ -17,7 +2937,7 @@
script.c
buildin_getitemname() ����
-----------------------------------------
+--------------------
//1031 by huge
�ENPC��script�ɁAmakepet��lj��B
makepet ��ID; �ŁA�y�b�g���쐬���܂��B
@@ -110,11 +3030,11 @@
pc.c
pc_calcstatus() �ύX
skill.c
-
+
skill_status_change_end() �ύX
skill_status_change_start() �ύX��NULL�`�F�b�N�C��
skill.h �ύX
-
+
--------------------
//1027 by Ni+S
�Egetitemname�֐��lj�
@@ -125,7 +3045,7 @@
script.c
getitemname()�lj�
-----------------------------------------
+--------------------
//1026 by (��)
�E1023�œ���ĂȂ�����clif.h�𓯍�
�E�o�C�I�v�����g�ƃX�t�B�A�[�}�C���ŏo����mob��|����mob_timer_delete()��nullpo���o��������������‚���
@@ -150,7 +3070,6 @@
�E�I�[���u���[�h���퐧����f��ȊO�S�ĂɏC��
�E�R���Z���g���[�V�������퐧���𗼎葄�݂̂���Ў葄+���葄�֏C��
�E�g�D���[�T�C�g���ʎ��Ԃ��C��
-�E�t�@���R���A�T���g���퐧���������A�f����܂߂��S�ĂŎg�p�”\��
(db/)
job_db2-2.txt �ύX
@@ -164,7 +3083,7 @@
(db/)
produce_db.txt �ύX
-----------------------------------------
+--------------------
//1023 by (��)
�E1022�ŃG���o�O����npc_parse_script()��߂�
�E�X�p�C�����s�A�[�X�̏d�ʒlj��_���[�W�v�Z����������ƕύX
@@ -403,14 +3322,18 @@
--------------------
//1014 by (Pepermint)
-I fixed again the problem if you put minus sign(-) in front of digits,
+I fixed again the problem if you put minus sign(-) in front of digits,
the error comes up when you puchase a item.
-When you put a minus sign(-), the error sign will be changed shrotage of
+When you put a minus sign(-), the error sign will be changed shrotage of
amount as original server dose.
I tested with it in ver. 1013, it was working
--------------------
+//1013 by (��)
+�E�T�[�o�[�X�i�b�v�V���b�g
+
+--------------------
//1012 by (��)
�Ehelp.txt�ɂ���@go�̐�������13��14���폜
�@�@�\�͏����ĂȂ��̂Ŏg���邱�Ƃ͎g���܂����Ahelp�ɍڂ���̂�jRO�ɗ��Ă���Ƃ������Ƃ�
diff --git a/db/skill_cast_db.txt b/db/skill_cast_db.txt
index 92e458588..93badb7a2 100644
--- a/db/skill_cast_db.txt
+++ b/db/skill_cast_db.txt
@@ -16,7 +16,7 @@
18,2000:1850:1700:1550:1400:1250:1100:950:800:650,0,5000:6000:7000:8000:9000:10000:11000:12000:13000:14000,0 //MG_FIREWALL#�t�@�C�A�[�E�H�[��#
19,700:1400:2100:2800:3500:4200:4900:5600:6300:7000,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0 //MG_FIREBOLT#�t�@�C�A�[�{���g#
20,700:1400:2100:2800:3500:4200:4900:5600:6300:7000,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0 //MG_LIGHTNINGBOLT#���C�g�j���O�{���g#
-21,1000:2000:3000:4000:5000:6000:7000:8000:9000:10000,2000,0,0 //MG_THUNDERSTORM#�T���_�[�X�g�[��#
+21,1000:2000:3000:4000:5000:6000:7000:8000:9000:10000,2000,500,0 //MG_THUNDERSTORM#�T���_�[�X�g�[��#
24,0,0,10000,0 //AL_RUWACH#���A�t#
25,0,0,10000,0 //AL_PNEUMA#�j���[�}#
@@ -62,17 +62,17 @@
78,0,3000,600000,0 //PR_LEXAETERNA#���b�N�X�G�[�e���i#
79,15000,4000,5000:6000:7000:8000:9000:10000:11000:12000:13000:14000,0 //PR_MAGNUS#�}�O�k�X�G�N�\�V�Y��#
80,3000:2700:2400:2100:1800:1500:1200:900:600:300,2000,30000,0 //WZ_FIREPILLAR#�t�@�C�A�[�s���[#
-81,700,2000,0,0 //WZ_SIGHTRASHER#�T�C�g���b�V���[#
+81,700,2000,500,0 //WZ_SIGHTRASHER#�T�C�g���b�V���[#
-83,15000,2000:3000:3000:4000:4000:5000:5000:6000:6000:7000,0,3200:3400:3600:3800:4000:4200:4400:4600:4800:5000 //WZ_METEOR#���e�I�X�g�[��#
+83,15000,2000:3000:3000:4000:4000:5000:5000:6000:6000:7000,500,3200:3400:3600:3800:4000:4200:4400:4600:4800:5000 //WZ_METEOR#���e�I�X�g�[��#
84,2500:3000:3500:4000:4500:5000:5500:6000:6500:7000,0,0,0 //WZ_JUPITEL#���s�e���T���_�[#
-85,15000:14500:14000:13500:13000:12500:12000:11500:11000:10500,5000,0,5500:6000:6500:7000:7500:8000:8500:9000:9500:10000 //WZ_VERMILION#���[�h�I�u���@�[�~���I��#
+85,15000:14500:14000:13500:13000:12500:12000:11500:11000:10500,5000,4100,5500:6000:6500:7000:7500:8000:8500:9000:9500:10000 //WZ_VERMILION#���[�h�I�u���@�[�~���I��#
86,1000:2000:3000:4000:5000,0,0,0 //WZ_WATERBALL#�E�H�[�^�[�{�[��#
87,0,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,0 //WZ_ICEWALL#�A�C�X�E�H�[��#
88,5000:4700:4400:4100:3800:3500:3200:2900:2700:2500,1000,0,3000:3500:4000:4500:5000:5500:6000:6500:7000:7500 //WZ_FROSTNOVA#�t���X�g�m���@#
-89,6000:7000:8000:9000:10000:11000:12000:13000:14000:15000,5000,0,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000 //WZ_STORMGUST#�X�g�[���K�X�g#
+89,6000:7000:8000:9000:10000:11000:12000:13000:14000:15000,5000,4600,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000 //WZ_STORMGUST#�X�g�[���K�X�g#
90,1000:2000:3000:4000:5000,700,0,0 //WZ_EARTHSPIKE#�A�[�X�X�p�C�N#
-91,1000:2000:3000:4000:5000,700,0,0 //WZ_HEAVENDRIVE#�w�����Y�h���C�u#
+91,1000:2000:3000:4000:5000,700,500,0 //WZ_HEAVENDRIVE#�w�����Y�h���C�u#
92,0,1000,5000:10000:15000:20000:25000,5000:10000:15000:20000:25000 //WZ_QUAGMIRE#�N�@�O�}�C�A#
110,0,0,0,6000:7000:8000:9000:10000:11000 //BS_HAMMERFALL#�n���}�[�t�H�[��#
@@ -155,7 +155,7 @@
251,0,700,0,0 //CR_SHIELDBOOMERANG#�V�[���h�u�[������#
252,0,0,300000,0 //CR_REFLECTSHIELD#���t���N�g�V�[���h#
253,0,0,0,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000 //CR_HOLYCROSS#�z�[���[�N���X#
-254,3000,1500,0,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000 //CR_GRANDCROSS#�O�����h�N���X#
+254,3000,1500,1000,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000 //CR_GRANDCROSS#�O�����h�N���X#
256,3000,0,180000,0 //CR_PROVIDENCE#�v�����B�f���X#
257,0,800,180000,0 //CR_DEFENDER#�f�B�t�F���_�[#
@@ -218,6 +218,8 @@
335,3000,0,0,0 //WE_FEMALE#���Ȃ��ɐs�����܂�#
336,0,0,10000,0 //WE_CALLPARTNER#���Ȃ��Ɉ�������#
+339,3000,1500,1000,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000 //NPC_DARKGRANDCROSS#�ŃO�����h�N���X
+
355,0,0,40000:60000:80000:100000:120000,0 //LK_AURABLADE#�I�[���u���[�h#
356,0,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,0 //LK_PARRYING#�p���C���O#
357,0,0,25000:30000:35000:40000:45000,0 //LK_CONCENTRATION#�R���Z���g���[�V����#
@@ -270,6 +272,10 @@
476,1000,1000,75000:90000:105000:120000:135000,0 //ST_FULLSTRIP##
479,2000,0,120000:240000:360000:480000:600000,0 //CR_FULLPROTECTION##
+10006,0,0,300000,0 //GD_LEADERSHIP##
+10007,0,0,300000,0 //GD_GLORYWOUNDS##
+10008,0,0,300000,0 //GD_SOULCOLD##
+10009,0,0,300000,0 //GD_HAWKEYES##
10010,100,1000,60000,0 //GD_BATTLEORDER##
10011,100,1000,60000,0 //GD_REGENERATION##
10012,100,1000,0,0 //GD_RESTORE##
diff --git a/db/skill_db.txt b/db/skill_db.txt
index d7b4fd9d0..c66c43a33 100644
--- a/db/skill_db.txt
+++ b/db/skill_db.txt
@@ -454,7 +454,7 @@
394,8,8,1,0,0,10,9,no,0,0,0,weapon,0 //CG_ARROWVULCAN#�A��?�o���J��#
395,0,0,4,0,1,1,1,yes,0,0,0,magic,0 //CG_MOONLIT#������̐�ɗ�����Ԃт�#
396,0,6,16,0,1,1,1,yes,0,0,0,magic,1 //CG_MARIONETTE#?���I�l�b�g�R���g��?��#
-397,4,8,1,0,0,5,1,no,0,0,0,weapon,0 //LK_SPIRALPIERCE#�X�p�C�����s�A?�X#
+397,4,8,1,0,0,5,5,no,0,0,0,weapon,0 //LK_SPIRALPIERCE#�X�p�C�����s�A?�X#
398,4,6,1,0,0,5,1,no,0,0,0,weapon,0 //LK_HEADCRUSH#�w�b�h�N���b�V��#
399,4,6,1,0,0,10,1,no,0,0,0,weapon,0 //LK_JOINTBEAT#�W���C���g�r?�g#
400,8,8,1,8,0,5,1:2:3:4:5,yes,0,0,0,magic,0 //HW_NAPALMVULCAN#�i�p??�o���J��#
diff --git a/db/skill_unit_db.txt b/db/skill_unit_db.txt
new file mode 100644
index 000000000..9c0616e30
--- /dev/null
+++ b/db/skill_unit_db.txt
@@ -0,0 +1,78 @@
+// id,unit,unit,layout,range,interval,target,flag
+// position -1:����, 0:1*1, 1:3*3, 2:5*5,..., 5:11*11
+// target friend:NOENEMY, party:PARTY, 0x20000:BCT_ALL, enemy:ENEMY
+// flag 0x001(UF_DEFNOTENEMY) defunit_not_enemy�̉e�����󂯂�
+// 0x002(UF_NOREITERRATION) �d�˒u���s��
+// 0x004(UF_NOFOOTSET) �����u���s��
+// 0x008(UF_NOOVERLAP) ���ʂ��d�����Ȃ�
+// 0x100(UF_DANCE) �_���X�X�L��
+// 0x200(UF_ENSEMBLE) ���t�X�L��
+//
+// 0x89,0x8a,0x8b �\������
+// 0x9a �������̉r���݂����ȃG�t�F�N�g
+// 0x9b �������̉r���݂����ȃG�t�F�N�g
+// 0x9c �������̉r���݂����ȃG�t�F�N�g
+// 0x9d ���������ȃG�t�F�N�g
+//
+// u1 u2 lay r intr target flag
+ 12,0x7e, , 0, 0, -1,all, 0x003 //MG_SAFETYWALL#�Z�C�t�e�B�E�H�[��
+ 18,0x7f, , -1, 0, 1,enemy, 0x000 //MG_FIREWALL#�t�@�C�A�[�E�H�[��
+ 21,0x86, , 0, 1,1000,enemy, 0x008 //MG_THUNDERSTORM#�T���_�[�X�g�[��
+ 25,0x85, , 1, 0, -1,all, 0x003 //AL_PNEUMA#�j���[�}
+ 27,0x81,0x80, 0, 0, -1,all, 0x002 //AL_WARP#���[�v�|�[�^��
+ 70,0x83, , -1, 1,1000,all, 0x000 //PR_SANCTUARY#�T���N�`���A��
+ 79,0x84, , -1, 1,3000,enemy, 0x000 //PR_MAGNUS#�}�O�k�X�G�N�\�V�Y��
+ 80,0x87,0x88, 0, 1,2000,enemy, 0x002 //WZ_FIREPILLAR#�t�@�C�A�[�s���[
+ 83,0x86, , 0, 3,1000,enemy, 0x000 //WZ_METEOR#���e�I�X�g�[��
+ 85,0x86, , 0, 6,1000,enemy, 0x008 //WZ_VERMILION#���[�h�I�u���@�[�~���I��
+ 87,0x8d, , -1, 0, -1,all, 0x000 //WZ_ICEWALL#�A�C�X�E�H�[��
+ 88,0x86, , 0, 2,1000,enemy, 0x000 //WZ_FROSTNOVA#�t���X�g�m���@
+ 89,0x86, , 0, 5, 450,enemy, 0x000 //WZ_STORMGUST#�X�g�[���K�X�g
+ 91,0x86, , 0, 2,1000,enemy, 0x000 //WZ_HEAVENDRIVE#�w�����Y�h���C�u
+ 92,0x8e, , 2, 0, -1,enemy, 0x000 //WZ_QUAGMIRE#�N�@�O�}�C�A
+115,0x90, , 0, 1,1000,enemy, 0x002 //HT_SKIDTRAP#�X�L�b�h�g���b�v
+116,0x93, , 0, 1,1000,enemy, 0x002 //HT_LANDMINE#�����h�}�C��
+117,0x91, , 0, 1,1000,enemy, 0x002 //HT_ANKLESNARE#�A���N���X�l�A
+118,0x94, , 0, 1,1000,enemy, 0x002 //HT_SHOCKWAVE#�V���b�N�E�F�[�u�g���b�v
+119,0x95, , 0, 2,1000,enemy, 0x002 //HT_SANDMAN#�T���h�}��
+120,0x96, , 0, 1,1000,enemy, 0x002 //HT_FLASHER#�t���b�V���[
+121,0x97, , 0, 1,1000,enemy, 0x002 //HT_FREEZINGTRAP#�t���[�W���O�g���b�v
+122,0x8f, , 0, 1,1000,enemy, 0x002 //HT_BLASTMINE#�u���X�g�}�C��
+123,0x98, , 0, 2,1000,enemy, 0x002 //HT_CLAYMORETRAP#�N���C���A�g���b�v
+125,0x99, , 0, 1,1000,all, 0x002 //HT_TALKIEBOX#�g�[�L�[�{�b�N�X
+140,0x92, , -1, 0,1000,enemy, 0x000 //AS_VENOMDUST#�x�i���_�X�g
+220,0xb0, , 0, 0, -1,all, 0x002 //RG_GRAFFITI#�O���t�B�e�B
+229,0xb1, , 0, 1,1000,enemy, 0x000 //AM_DEMONSTRATION#�f�����X�g���[�V����
+254,0x86, , -1, 0, 300,enemy, 0x000 //CR_GRANDCROSS#�O�����h�N���X
+285,0x9a, , 3, 0, -1,all, 0x000 //SA_VOLCANO#�{���P�[�m
+286,0x9b, , 3, 0, -1,all, 0x000 //SA_DELUGE#�f�����[�W
+287,0x9c, , 3, 0, -1,all, 0x000 //SA_VIOLENTGALE#�o�C�I�����g�Q�C��
+288,0x9d, , 3, 0, -1,all, 0x000 //SA_LANDPROTECTOR#�����h�v���e�N�^�[
+306,0x9e, , 4, 0, -1,all, 0x300 //BD_LULLABY#�q���
+307,0x9f, , 4, 0, -1,party, 0x300 //BD_RICHMANKIM#�j�����h�̉�
+308,0xa0, , 4, 0, -1,enemy, 0x300 //BD_ETERNALCHAOS#�i���̍���
+309,0xa1, , 4, 0, -1,party, 0x300 //BD_DRUMBATTLEFIELD#�푾�ۂ̋���
+310,0xa2, , 4, 0, -1,party, 0x300 //BD_RINGNIBELUNGEN#�j�[�x�����O�̎w��
+311,0xa3, , 4, 0, -1,all, 0x300 //BD_ROKISWEIL#���L�̋���
+312,0xa4, , 4, 0, -1,party, 0x300 //BD_INTOABYSS#�[���̒���
+313,0xa5, , 4, 0, -1,party, 0x300 //BD_SIEGFRIED#�s���g�̃W�[�N�t���[�h
+317,0xa6, , 3, 0, -1,enemy, 0x100 //BA_DISSONANCE#�s���a��
+319,0xa7, , 3, 0, -1,friend,0x100 //BA_WHISTLE#���J
+320,0xa8, , 3, 0, -1,friend,0x100 //BA_ASSASSINCROSS#�[�z�̃A�T�V���N���X
+321,0xa9, , 3, 0, -1,friend,0x100 //BA_POEMBRAGI#�u���M�̎�
+322,0xaa, , 3, 0, -1,friend,0x100 //BA_APPLEIDUN#�C�h�D���̗ь�
+325,0xab, , 3, 0, -1,enemy, 0x100 //DC_UGLYDANCE#��������ȃ_���X
+327,0xac, , 3, 0, -1,friend,0x100 //DC_HUMMING#�n�~���O
+328,0xad, , 3, 0, -1,enemy, 0x100,0 //DC_DONTFORGETME#����Y��Ȃ��Łc
+329,0xae, , 3, 0, -1,friend,0x100,0 //DC_FORTUNEKISS#�K�^�̃L�X
+330,0xaf, , 3, 0, -1,party, 0x100,0 //DC_SERVICEFORYOU#�T�[�r�X�t�H�[���[
+336,0xb2, , 0,-1, -1,all, 0x000,0 //WE_CALLPARTNER#���Ȃ��Ɉ�������
+339,0x86, , -1, 0, 300,enemy, 0x000,0 //NPC_DARKGRANDCROSS#�ŃO�����h�N���X
+362,0xb4, , 0, 3, 300,all, 0x000,0 //HP_BASILICA#�o�W���J
+369,0xb3, , 3, 0, -1,all, 0x000,0 //PA_GOSPEL#�S�X�y��
+404,0xb6, , -1, 0, -1,all, 0x000,0 //PF_FOGWALL#�t�H�O�E�H�[��
+405,0xb7, , 0, 1,1000,enemy, 0x002,0 //PF_SPIDERWEB#�X�p�C�_�[�E�F�b�u
+10006,0xc1, , 0, 2, -1,all, 0x000,0 //GD_LEADERSHIP
+10007,0xc2, , 0, 2, -1,all, 0x000,0 //GD_GLORYWOUNDS
+10008,0xc3, , 0, 2, -1,all, 0x000,0 //GD_SOULCOLD
+10009,0xc4, , 0, 2, -1,all, 0x000,0 //GD_HAWKEYES
diff --git a/src/char/Makefile b/src/char/Makefile
index 3c09db92c..aee0e69e2 100644
--- a/src/char/Makefile
+++ b/src/char/Makefile
@@ -1,7 +1,7 @@
all: char-server
txt: char-server
-COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/lock.o ../common/malloc.o ../common/showmsg.o ../common/strlib.o
+COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o ../common/obj/db.o ../common/obj/lock.o ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/strlib.o
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/db.h ../common/lock.h ../common/timer.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h
char-server: char.o inter.o int_party.o int_guild.o int_storage.o int_pet.o $(COMMON_OBJ)
$(CC) -o ../../$@ $> $(LIB_S)
diff --git a/src/char_sql/Makefile b/src/char_sql/Makefile
index e206dd211..1741b5ab6 100644
--- a/src/char_sql/Makefile
+++ b/src/char_sql/Makefile
@@ -1,7 +1,7 @@
all: char-server_sql
sql: char-server_sql
-COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o ../common/utils.o ../common/strlib.o
+COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o ../common/obj/db.o ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/utils.o ../common/obj/strlib.o
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/db.h ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h
char-server_sql: char.o inter.o int_party.o int_guild.o int_storage.o int_pet.o itemdb.o $(COMMON_OBJ)
diff --git a/src/common/Makefile b/src/common/Makefile
index eaa7205d2..c387c2e01 100644
--- a/src/common/Makefile
+++ b/src/common/Makefile
@@ -1,15 +1,23 @@
-txt sql all: core.o socket.o timer.o grfio.o db.o lock.o nullpo.o malloc.o showmsg.o
-
-core.o: core.c core.h showmsg.h
-socket.o: socket.c socket.h mmo.h showmsg.h
-timer.o: timer.c timer.h showmsg.h
-grfio.o: grfio.c grfio.h showmsg.h
-db.o: db.c db.h showmsg.h
-lock.o: lock.h showmsg.h
-nullpo.o: nullpo.c nullpo.h showmsg.h
-malloc.o: malloc.c malloc.h showmsg.h
-showmsg.o: showmsg.c showmsg.h
-strlib.o: strlib.c strlib.h utils.h
+txt sql all: obj common
+
+obj:
+ mkdir obj
+
+common: obj/core.o obj/socket.o obj/timer.o obj/grfio.o obj/db.o obj/lock.o obj/nullpo.o obj/malloc.o obj/showmsg.o obj/strlib.o obj/utils.o
+
+obj/%.o: %.c
+ $(COMPILE.c) $(OUTPUT_OPTION) $<
+
+obj/core.o: core.c core.h showmsg.h
+obj/socket.o: socket.c socket.h mmo.h showmsg.h
+obj/timer.o: timer.c timer.h showmsg.h
+obj/grfio.o: grfio.c grfio.h showmsg.h
+obj/db.o: db.c db.h showmsg.h
+obj/lock.o: lock.h showmsg.h
+obj/nullpo.o: nullpo.c nullpo.h showmsg.h
+obj/malloc.o: malloc.c malloc.h showmsg.h
+obj/showmsg.o: showmsg.c showmsg.h
+obj/strlib.o: strlib.c strlib.h utils.h
clean:
- rm -f *.o
+ rm -f *.o obj
diff --git a/src/common/core.c b/src/common/core.c
index fbd607080..016ade08d 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -9,10 +9,13 @@
#include <signal.h>
#include <string.h>
#ifdef DUMPSTACK
-#include <execinfo.h>
+ #ifndef _WIN32 // HAVE_EXECINFO_H
+ #include <execinfo.h>
+ #endif
#endif
#include "../common/mmo.h"
+#include "malloc.h"
#include "core.h"
#include "socket.h"
#include "timer.h"
@@ -92,44 +95,44 @@ static void sig_proc(int sn)
* Dumps the stack using glibc's backtrace
*-----------------------------------------
*/
-#ifdef DUMPSTACK
static void sig_dump(int sn)
{
- FILE *fp;
- void* array[20];
+ #ifdef DUMPSTACK
+ FILE *fp;
+ void* array[20];
- char **stack;
- size_t size;
- int no = 0;
- char tmp[256];
+ char **stack;
+ size_t size;
+ int no = 0;
+ char tmp[256];
- // search for a usable filename
- do {
- sprintf(tmp,"save/stackdump_%04d.txt", ++no);
- } while((fp = fopen(tmp,"r")) && (fclose(fp), no < 9999));
- // dump the trace into the file
- if ((fp = fopen (tmp,"w")) != NULL) {
+ // search for a usable filename
+ do {
+ sprintf(tmp,"save/stackdump_%04d.txt", ++no);
+ } while((fp = fopen(tmp,"r")) && (fclose(fp), no < 9999));
+ // dump the trace into the file
+ if ((fp = fopen (tmp,"w")) != NULL) {
- fprintf(fp,"Exception: %s\n", strsignal(sn));
- fprintf(fp,"Stack trace:\n");
- size = backtrace (array, 20);
- stack = backtrace_symbols (array, size);
+ fprintf(fp,"Exception: %s\n", strsignal(sn));
+ fprintf(fp,"Stack trace:\n");
+ size = backtrace (array, 20);
+ stack = backtrace_symbols (array, size);
- for (no = 0; no < size; no++) {
+ for (no = 0; no < size; no++) {
- fprintf(fp, "%s\n", stack[no]);
+ fprintf(fp, "%s\n", stack[no]);
- }
- fprintf(fp,"End of stack trace\n");
+ }
+ fprintf(fp,"End of stack trace\n");
- fclose(fp);
- free(stack);
- }
+ fclose(fp);
+ free(stack);
+ }
+ #endif
// When pass the signal to the system's default handler
compat_signal(sn, SIG_DFL);
raise(sn);
}
-#endif
int get_svn_revision(char *svnentry) { // Warning: minor syntax checking
char line[1024];
@@ -204,28 +207,20 @@ int main(int argc,char **argv)
compat_signal(SIGPIPE,SIG_IGN);
compat_signal(SIGTERM,sig_proc);
compat_signal(SIGINT,sig_proc);
-
-#ifndef DUMPSTACK
- // Signal to create coredumps by system when necessary (crash)
- compat_signal(SIGSEGV, SIG_DFL);
- compat_signal(SIGFPE, SIG_DFL);
- compat_signal(SIGILL, SIG_DFL);
- #ifndef _WIN32
- compat_signal(SIGBUS, SIG_DFL);
- compat_signal(SIGTRAP, SIG_DFL);
- #endif
-#else
+
+ // Signal to create coredumps by system when necessary (crash)
compat_signal(SIGSEGV, sig_dump);
compat_signal(SIGFPE, sig_dump);
compat_signal(SIGILL, sig_dump);
#ifndef _WIN32
compat_signal(SIGBUS, sig_dump);
- compat_signal(SIGTRAP, SIG_DFL);
+ compat_signal(SIGTRAP, SIG_DFL);
#endif
-#endif
display_title();
+ do_init_memmgr(argv[0]); // ��ԍŏ��Ɏ��s����K�v������
+
tick_ = time(0);
do_init(argc,argv);
@@ -234,5 +229,6 @@ int main(int argc,char **argv)
do_sendrecv(next);
do_parsepacket();
}
+
return 0;
}
diff --git a/src/common/db.c b/src/common/db.c
index 12d54176c..9f2c75a68 100644
--- a/src/common/db.c
+++ b/src/common/db.c
@@ -65,7 +65,7 @@ static unsigned int strdb_hash(struct dbt* table,void* a)
return h;
}
-struct dbt* strdb_init(int maxlen)
+struct dbt* strdb_init_(int maxlen,const char *file,int line)
{
int i;
struct dbt* table;
@@ -77,6 +77,9 @@ struct dbt* strdb_init(int maxlen)
table->maxlen=maxlen;
for(i=0;i<HASH_SIZE;i++)
table->ht[i]=NULL;
+ table->alloc_file = file;
+ table->alloc_line = line;
+ table->item_count = 0;
return table;
}
@@ -98,7 +101,7 @@ static unsigned int numdb_hash(struct dbt* table,void* a)
return (unsigned int)a;
}
-struct dbt* numdb_init(void)
+struct dbt* numdb_init_(const char *file,int line)
{
int i;
struct dbt* table;
@@ -110,6 +113,9 @@ struct dbt* numdb_init(void)
table->maxlen=sizeof(int);
for(i=0;i<HASH_SIZE;i++)
table->ht[i]=NULL;
+ table->alloc_file = file;
+ table->alloc_line = line;
+ table->item_count = 0;
return table;
}
@@ -400,6 +406,7 @@ struct dbn* db_insert(struct dbt *table,void* key,void* data)
db_rebalance(p,&table->ht[hash]);
}
}
+ table->item_count++;
return p;
}
@@ -428,12 +435,14 @@ void* db_erase(struct dbt *table,void* key)
#else
aFree(p);
#endif
+ table->item_count--;
return data;
}
void db_foreach(struct dbt *table,int (*func)(void*,void*,va_list),...)
{
int i,sp;
+ int count = 0;
// red-black tree�Ȃ̂�64��stack�������2^32�ƒm�[�h�܂ő��v
struct dbn *p,*pn,*stack[64];
va_list ap;
@@ -449,6 +458,7 @@ void db_foreach(struct dbt *table,int (*func)(void*,void*,va_list),...)
// printf("Warning: no data for key %d in db_foreach (db.c) !\n",(int)p->key);
//} else {
func(p->key, p->data, ap);
+ count++;
//}
if((pn=p->left)!=NULL){
if(p->right){
@@ -466,6 +476,12 @@ void db_foreach(struct dbt *table,int (*func)(void*,void*,va_list),...)
}
}
}
+ if(count != table->item_count) {
+ printf(
+ "db_foreach : data lost %d of %d item(s) allocated from %s line %d\n",
+ table->item_count - count,count,table->alloc_file,table->alloc_line
+ );
+ }
va_end(ap);
}
diff --git a/src/common/db.h b/src/common/db.h
index ea9aceab0..c31f5bfaa 100644
--- a/src/common/db.h
+++ b/src/common/db.h
@@ -22,6 +22,9 @@ struct dbt {
void (*release)(struct dbn*,int which);
int maxlen;
struct dbn *ht[HASH_SIZE];
+ int item_count; // vf?
+ const char* alloc_file; // DB?t@C
+ int alloc_line; // DB?s
};
#define strdb_search(t,k) db_search((t),(void*)(k))
@@ -34,9 +37,12 @@ struct dbt {
#define numdb_erase(t,k) db_erase ((t),(void*)(k))
#define numdb_foreach db_foreach
#define numdb_final db_final
+#define strdb_init(a) strdb_init_(a,__FILE__,__LINE__)
+#define numdb_init() numdb_init_(__FILE__,__LINE__)
+
+struct dbt* strdb_init_(int maxlen,const char *file,int line);
+struct dbt* numdb_init_(const char *file,int line);
-struct dbt* strdb_init(int maxlen);
-struct dbt* numdb_init(void);
void* db_search(struct dbt *table,void* key);
void* db_search2(struct dbt *table, const char *key); // [MouseJstr]
struct dbn* db_insert(struct dbt *table,void* key,void* data);
diff --git a/src/common/grfio.c b/src/common/grfio.c
index 0c628d163..224ea909e 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -32,21 +32,36 @@
#include "malloc.h"
#ifdef _WIN32
- #include <windows.h>
- #include "../lib/zlib_win32.h"
- HINSTANCE zlib_dll;
- #define zlib_inflateInit(strm) zlib_inflateInit_((strm),ZLIB_VERSION, sizeof(z_stream))
- #define zlib_deflateInit(strm, level) zlib_deflateInit_((strm),(level),ZLIB_VERSION,sizeof(z_stream))
-
- int (WINAPI* zlib_inflateInit_) (z_streamp strm, const char *version, int stream_size);
- int (WINAPI* zlib_inflate) (z_streamp strm, int flush);
- int (WINAPI* zlib_inflateEnd) (z_streamp strm);
-
- int (WINAPI* zlib_deflateInit_) (z_streamp strm, int level, const char *version, int stream_size);
- int (WINAPI* zlib_deflate) (z_streamp strm, int flush);
- int (WINAPI* zlib_deflateEnd) (z_streamp strm);
+ #ifdef LOCALZLIB
+ #include "../lib/zlib/zlib.h"
+ #define zlib_inflateInit inflateInit
+ #define zlib_inflate inflate
+ #define zlib_inflateEnd inflateEnd
+ #define zlib_deflateInit deflateInit
+ #define zlib_deflate deflate
+ #define zlib_deflateEnd deflateEnd
+ #else
+ #include <windows.h>
+ #include "../lib/zlib_win32.h"
+ HINSTANCE zlib_dll;
+ #define zlib_inflateInit(strm) zlib_inflateInit_((strm),ZLIB_VERSION, sizeof(z_stream))
+ #define zlib_deflateInit(strm, level) zlib_deflateInit_((strm),(level),ZLIB_VERSION,sizeof(z_stream))
+
+ int (WINAPI* zlib_inflateInit_) (z_streamp strm, const char *version, int stream_size);
+ int (WINAPI* zlib_inflate) (z_streamp strm, int flush);
+ int (WINAPI* zlib_inflateEnd) (z_streamp strm);
+
+ int (WINAPI* zlib_deflateInit_) (z_streamp strm, int level, const char *version, int stream_size);
+ int (WINAPI* zlib_deflate) (z_streamp strm, int flush);
+ int (WINAPI* zlib_deflateEnd) (z_streamp strm);
+ #endif
#else
- #include <zlib.h>
+ #ifdef LOCALZLIB
+ #include "zlib/zlib.h"
+ #else
+ #include <zlib.h>
+ #endif
+
#define zlib_inflateInit inflateInit
#define zlib_inflate inflate
#define zlib_inflateEnd inflateEnd
@@ -966,6 +981,16 @@ void grfio_final(void)
}
gentry_table = NULL;
gentry_entrys = gentry_maxentry = 0;
+
+#ifdef _WIN32
+ #ifndef LOCALZLIB
+ FreeLibrary(zlib_dll);
+ zlib_inflateInit_ = NULL;
+ zlib_inflate = NULL;
+ zlib_inflateEnd = NULL;
+ #endif
+#endif
+
}
/*==========================================
@@ -979,6 +1004,7 @@ void grfio_init(char *fname)
int result = 0, result2 = 0, result3 = 0, result4 = 0;
#ifdef _WIN32
+ #ifndef LOCALZLIB
if(!zlib_dll) {
zlib_dll = LoadLibrary("zlib.dll");
(FARPROC)zlib_inflateInit_ = GetProcAddress(zlib_dll,"inflateInit_");
@@ -992,6 +1018,7 @@ void grfio_init(char *fname)
exit(1);
}
}
+ #endif
#endif
data_conf = fopen(fname, "r");
diff --git a/src/common/malloc.c b/src/common/malloc.c
index 089a9db18..40c9f34bf 100644
--- a/src/common/malloc.c
+++ b/src/common/malloc.c
@@ -3,14 +3,25 @@
#include <string.h>
#include "malloc.h"
-#if !defined(DMALLOC) && !defined(GCOLLECT) && !defined(BCHECK)
+#ifdef MEMWATCH
+#include "memwatch.h"
+#endif
+
+// �Ǝ��������}�l�[�W�����g�p����ꍇ�A���̃R�����g���O���Ă��������B
+// #define USE_MEMMGR
+
+#if !defined(DMALLOC) && !defined(GCOLLECT) && !defined(BCHECK) && !defined(USE_MEMMGR)
void* aMalloc_( size_t size, const char *file, int line, const char *func )
{
void *ret;
// printf("%s:%d: in func %s: malloc %d\n",file,line,func,size);
+#ifdef MEMWATCH
+ ret=mwMalloc(size,file,line);
+#else
ret=malloc(size);
+#endif
if(ret==NULL){
printf("%s:%d: in func %s: malloc error out of memory!\n",file,line,func);
exit(1);
@@ -23,7 +34,11 @@ void* aCalloc_( size_t num, size_t size, const char *file, int line, const char
void *ret;
// printf("%s:%d: in func %s: calloc %d %d\n",file,line,func,num,size);
+#ifdef MEMWATCH
+ ret=mwCalloc(num,size,file,line);
+#else
ret=calloc(num,size);
+#endif
if(ret==NULL){
printf("%s:%d: in func %s: calloc error out of memory!\n",file,line,func);
exit(1);
@@ -37,7 +52,11 @@ void* aRealloc_( void *p, size_t size, const char *file, int line, const char *f
void *ret;
// printf("%s:%d: in func %s: realloc %p %d\n",file,line,func,p,size);
+#ifdef MEMWATCH
+ ret=mwRealloc(p,size,file,line);
+#else
ret=realloc(p,size);
+#endif
if(ret==NULL){
printf("%s:%d: in func %s: realloc error out of memory!\n",file,line,func);
exit(1);
@@ -46,10 +65,39 @@ void* aRealloc_( void *p, size_t size, const char *file, int line, const char *f
return ret;
}
+void* aStrdup_( const void *p, const char *file, int line, const char *func )
+{
+ void *ret;
+
+ // printf("%s:%d: in func %s: strdup %p\n",file,line,func,p);
+#ifdef MEMWATCH
+ ret=mwStrdup(p,file,line);
+#else
+ ret=strdup(p);
+#endif
+ if(ret==NULL){
+ printf("%s:%d: in func %s: strdup error out of memory!\n",file,line,func);
+ exit(1);
+
+ }
+ return ret;
+}
+
+void aFree_( void *p, const char *file, int line, const char *func )
+{
+ // printf("%s:%d: in func %s: free %p\n",file,line,func,p);
+#ifdef MEMWATCH
+ mwFree(p,file,line);
+#else
+ free(p);
#endif
+}
+int do_init_memmgr(const char* file) {
+ return 0;
+}
-#if defined(GCOLLECT)
+#elif defined(GCOLLECT)
void * _bcallocA(size_t size, size_t cnt) {
void *ret = aMallocA(size * cnt);
@@ -62,7 +110,6 @@ void * _bcalloc(size_t size, size_t cnt) {
memset(ret, 0, size * cnt);
return ret;
}
-#endif
char * _bstrdup(const char *chr) {
int len = strlen(chr);
@@ -70,3 +117,434 @@ char * _bstrdup(const char *chr) {
strcpy(ret, chr);
return ret;
}
+
+#elif defined(USE_MEMMGR)
+
+/* USE_MEMMGR */
+
+/*
+ * �������}�l�[�W��
+ * malloc , free �̏����������I�ɏo����悤�ɂ������́B
+ * ���G�ȏ������s���Ă���̂ŁA�኱�d���Ȃ邩������܂���B
+ *
+ * �f�[�^�\���Ȃǁi��������ł����܂���^^; �j
+ * �E�������𕡐��́u�u���b�N�v�ɕ����āA����Ƀu���b�N�𕡐��́u���j�b�g�v
+ * �ɕ����Ă��܂��B���j�b�g�̃T�C�Y�́A�P�u���b�N�̗e�ʂ𕡐��‚ɋϓ��z��
+ * �������̂ł��B���Ƃ��΁A�P���j�b�g32KB�̏ꍇ�A�u���b�N�P�‚�32Byte�̃�
+ * �j�b�g���A1024�W�܂��ďo���Ă�����A64Byte�̃��j�b�g�� 512�W�܂���
+ * �o���Ă����肵�܂��B�ipadding,unit_head �������j
+ *
+ * �E���j�b�g���m�̓����N���X�g(block_prev,block_next) �ł‚Ȃ���A�����T�C
+ * �Y�����ƒ��j�b�g���m�������N���X�g(samesize_prev,samesize_nect) �ł‚�
+ * �����Ă��܂��B����ɂ��A�s�v�ƂȂ����������̍ė��p�������I�ɍs���܂��B
+ */
+
+/* �u���b�N�ɓ���f�[�^�� */
+#define BLOCK_DATA_SIZE 80*1024
+
+/* ��x�Ɋm�ۂ���u���b�N�̐��B */
+#define BLOCK_ALLOC 32
+
+/* �u���b�N�̃A���C�����g */
+#define BLOCK_ALIGNMENT 64
+
+/* �u���b�N */
+struct block {
+ int block_no; /* �u���b�N�ԍ� */
+ struct block* block_prev; /* �O�Ɋm�ۂ����̈� */
+ struct block* block_next; /* ���Ɋm�ۂ����̈� */
+ int samesize_no; /* �����T�C�Y�̔ԍ� */
+ struct block* samesize_prev; /* �����T�C�Y�̑O�̗̈� */
+ struct block* samesize_next; /* �����T�C�Y�̎��̗̈� */
+ int unit_size; /* ���j�b�g�̃o�C�g�� 0=���g�p */
+ int unit_hash; /* ���j�b�g�̃n�b�V�� */
+ int unit_count; /* ���j�b�g�̐� */
+ int unit_used; /* �g�p�ς݃��j�b�g */
+ char data[BLOCK_DATA_SIZE];
+};
+
+struct unit_head {
+ struct block* block;
+ int size;
+ const char* file;
+ int line;
+};
+
+static struct block* block_first = NULL;
+static struct block* block_last = NULL;
+static struct block* block_unused = NULL;
+
+/* ���j�b�g�ւ̃n�b�V���B80KB/64Byte = 1280�� */
+static struct block* unit_first[BLOCK_DATA_SIZE/BLOCK_ALIGNMENT]; /* �ŏ� */
+static struct block* unit_unfill[BLOCK_DATA_SIZE/BLOCK_ALIGNMENT]; /* ���܂��ĂȂ� */
+static struct block* unit_last[BLOCK_DATA_SIZE/BLOCK_ALIGNMENT]; /* �Ō� */
+
+/* ���������g���񂹂Ȃ��̈�p�̃f�[�^ */
+struct unit_head_large {
+ struct unit_head_large* prev;
+ struct unit_head_large* next;
+ struct unit_head unit_head;
+};
+static struct unit_head_large *unit_head_large_first = NULL;
+
+static struct block* block_malloc(void);
+static void block_free(struct block* p);
+static void memmgr_info(void);
+
+void* aMalloc_(size_t size, const char *file, int line, const char *func ) {
+ int i;
+ struct block *block;
+ int size_hash = (size+BLOCK_ALIGNMENT-1) / BLOCK_ALIGNMENT;
+ size = size_hash * BLOCK_ALIGNMENT; /* �A���C�����g�̔{���ɐ؂�グ */
+
+ if(size == 0) {
+ return NULL;
+ }
+
+ /* �u���b�N���𒴂���̈�̊m�ۂɂ́Amalloc() ��p���� */
+ /* ���̍ہAunit_head.block �� NULL �������ċ�ʂ��� */
+ if(size > BLOCK_DATA_SIZE - sizeof(struct unit_head)) {
+#ifdef MEMWATCH
+ struct unit_head_large* p = (struct unit_head_large*)mwMalloc(sizeof(struct unit_head_large) + size,file,line);
+#else
+ struct unit_head_large* p = (struct unit_head_large*)malloc(sizeof(struct unit_head_large) + size);
+#endif
+ if(p != NULL) {
+ p->unit_head.block = NULL;
+ p->unit_head.size = size;
+ p->unit_head.file = file;
+ p->unit_head.line = line;
+ if(unit_head_large_first == NULL) {
+ unit_head_large_first = p;
+ p->next = NULL;
+ p->prev = NULL;
+ } else {
+ unit_head_large_first->prev = p;
+ p->prev = NULL;
+ p->next = unit_head_large_first;
+ unit_head_large_first = p;
+ }
+ return (char *)p + sizeof(struct unit_head_large);
+ } else {
+ printf("MEMMGR::memmgr_alloc failed.\n");
+ exit(1);
+ }
+ }
+
+ /* ����T�C�Y�̃u���b�N���m�ۂ���Ă��Ȃ����A�V���Ɋm�ۂ��� */
+ if(unit_unfill[size_hash] == NULL) {
+ block = block_malloc();
+ if(unit_first[size_hash] == NULL) {
+ /* ����m�� */
+ unit_first[size_hash] = block;
+ unit_last[size_hash] = block;
+ block->samesize_no = 0;
+ block->samesize_prev = NULL;
+ block->samesize_next = NULL;
+ } else {
+ /* �A����� */
+ unit_last[size_hash]->samesize_next = block;
+ block->samesize_no = unit_last[size_hash]->samesize_no + 1;
+ block->samesize_prev = unit_last[size_hash];
+ block->samesize_next = NULL;
+ unit_last[size_hash] = block;
+ }
+ unit_unfill[size_hash] = block;
+ block->unit_size = size + sizeof(struct unit_head);
+ block->unit_count = BLOCK_DATA_SIZE / block->unit_size;
+ block->unit_used = 0;
+ block->unit_hash = size_hash;
+ /* ���g�pFlag�𗧂Ă� */
+ for(i=0;i<block->unit_count;i++) {
+ ((struct unit_head*)(&block->data[block->unit_size * i]))->block = NULL;
+ }
+ }
+ /* ���j�b�g�g�p�����Z */
+ block = unit_unfill[size_hash];
+ block->unit_used++;
+
+ /* ���j�b�g����S�Ďg���ʂ����� */
+ if(block->unit_count == block->unit_used) {
+ do {
+ unit_unfill[size_hash] = unit_unfill[size_hash]->samesize_next;
+ } while(
+ unit_unfill[size_hash] != NULL &&
+ unit_unfill[size_hash]->unit_count == unit_unfill[size_hash]->unit_used
+ );
+ }
+
+ /* �u���b�N�̒��̋󂫃��j�b�g�{�� */
+ for(i=0;i<block->unit_count;i++) {
+ struct unit_head *head = (struct unit_head*)(&block->data[block->unit_size * i]);
+ if(head->block == NULL) {
+ head->block = block;
+ head->size = size;
+ head->line = line;
+ head->file = file;
+ return (char *)head + sizeof(struct unit_head);
+ }
+ }
+ // �����ɗ��Ă͂����Ȃ��B
+ printf("MEMMGR::memmgr_malloc() serious error.\n");
+ memmgr_info();
+ exit(1);
+ return NULL;
+};
+
+void* aCalloc_(size_t num, size_t size, const char *file, int line, const char *func ) {
+ void *p = aMalloc_(num * size,file,line,func);
+ memset(p,0,num * size);
+ return p;
+}
+
+void* aRealloc_(void *memblock, size_t size, const char *file, int line, const char *func ) {
+ size_t old_size;
+ if(memblock == NULL) {
+ return aMalloc_(size,file,line,func);
+ }
+
+ old_size = ((struct unit_head *)((char *)memblock - sizeof(struct unit_head)))->size;
+ if(old_size > size) {
+ // �T�C�Y�k�� -> ���̂܂ܕԂ��i�蔲���j
+ return memblock;
+ } else {
+ // �T�C�Y�g��
+ void *p = aMalloc_(size,file,line,func);
+ if(p != NULL) {
+ memcpy(p,memblock,old_size);
+ }
+ aFree_(memblock,file,line,func);
+ return p;
+ }
+}
+
+void* aStrdup_(const void* string, const char *file, int line, const char *func ) {
+ if(string == NULL) {
+ return NULL;
+ } else {
+ int len = strlen(string);
+ char *p = (char *)aMalloc_(len + 1,file,line,func);
+ memcpy(p,string,len+1);
+ return p;
+ }
+}
+
+void aFree_(void *ptr, const char *file, int line, const char *func ) {
+ struct unit_head *head = (struct unit_head *)((char *)ptr - sizeof(struct unit_head));
+ if(ptr == NULL) {
+ return;
+ } else if(head->block == NULL && head->size > BLOCK_DATA_SIZE - sizeof(struct unit_head)) {
+ /* malloc() �Œ��Ɋm�ۂ��ꂽ�̈� */
+ struct unit_head_large *head_large = (struct unit_head_large *)((char *)ptr - sizeof(struct unit_head_large));
+ if(head_large->prev) {
+ head_large->prev->next = head_large->next;
+ } else {
+ unit_head_large_first = head_large->next;
+ }
+ if(head_large->next) {
+ head_large->next->prev = head_large->prev;
+ }
+ free(head_large);
+ return;
+ } else {
+ /* ���j�b�g��� */
+ struct block *block = head->block;
+ if(head->block == NULL) {
+ printf("memmgr: args of aFree is freed pointer %s line %d\n",file,line);
+ } else {
+ head->block = NULL;
+ if(--block->unit_used == 0) {
+ /* �u���b�N�̉�� */
+ if(unit_unfill[block->unit_hash] == block) {
+ /* �󂫃��j�b�g�Ɏw�肳��Ă��� */
+ do {
+ unit_unfill[block->unit_hash] = unit_unfill[block->unit_hash]->samesize_next;
+ } while(
+ unit_unfill[block->unit_hash] != NULL &&
+ unit_unfill[block->unit_hash]->unit_count == unit_unfill[block->unit_hash]->unit_used
+ );
+ }
+ if(block->samesize_prev == NULL && block->samesize_next == NULL) {
+ /* �Ɨ��u���b�N�̉�� */
+ unit_first[block->unit_hash] = NULL;
+ unit_last[block->unit_hash] = NULL;
+ unit_unfill[block->unit_hash] = NULL;
+ } else if(block->samesize_prev == NULL) {
+ /* �擪�u���b�N�̉�� */
+ unit_first[block->unit_hash] = block->samesize_next;
+ (block->samesize_next)->samesize_prev = NULL;
+ } else if(block->samesize_next == NULL) {
+ /* ���[�u���b�N�̉�� */
+ unit_last[block->unit_hash] = block->samesize_prev;
+ (block->samesize_prev)->samesize_next = NULL;
+ } else {
+ /* ���ԃu���b�N�̉�� */
+ (block->samesize_next)->samesize_prev = block->samesize_prev;
+ (block->samesize_prev)->samesize_next = block->samesize_next;
+ }
+ block_free(block);
+ } else {
+ /* �󂫃��j�b�g�̍Đݒ� */
+ if(
+ unit_unfill[block->unit_hash] == NULL ||
+ unit_unfill[block->unit_hash]->samesize_no > block->samesize_no
+ ) {
+ unit_unfill[block->unit_hash] = block;
+ }
+ }
+ }
+ }
+}
+
+/* ���݂̏󋵂�\������ */
+static void memmgr_info(void) {
+ int i;
+ struct block *p;
+ printf("** Memory Maneger Information **\n");
+ if(block_first == NULL) {
+ printf("Uninitialized.\n");
+ return;
+ }
+ printf(
+ "Blocks: %04u , BlockSize: %06u Byte , Used: %08uKB\n",
+ block_last->block_no+1,sizeof(struct block),
+ (block_last->block_no+1) * sizeof(struct block) / 1024
+ );
+ p = block_first;
+ for(i=0;i<=block_last->block_no;i++) {
+ printf(" Block #%04u : ",p->block_no);
+ if(p->unit_size == 0) {
+ printf("unused.\n");
+ } else {
+ printf(
+ "size: %05u byte. used: %04u/%04u prev:",
+ p->unit_size - sizeof(struct unit_head),p->unit_used,p->unit_count
+ );
+ if(p->samesize_prev == NULL) {
+ printf("NULL");
+ } else {
+ printf("%04u",(p->samesize_prev)->block_no);
+ }
+ printf(" next:");
+ if(p->samesize_next == NULL) {
+ printf("NULL");
+ } else {
+ printf("%04u",(p->samesize_next)->block_no);
+ }
+ printf("\n");
+ }
+ p = p->block_next;
+ }
+}
+
+/* �u���b�N���m�ۂ��� */
+static struct block* block_malloc(void) {
+ if(block_unused != NULL) {
+ /* �u���b�N�p�̗̈�͊m�ۍς� */
+ struct block* ret = block_unused;
+ do {
+ block_unused = block_unused->block_next;
+ } while(block_unused != NULL && block_unused->unit_size != 0);
+ return ret;
+ } else {
+ /* �u���b�N�p�̗̈��V���Ɋm�ۂ��� */
+ int i;
+ int block_no;
+ struct block* p = (struct block *)calloc(sizeof(struct block),BLOCK_ALLOC);
+ if(p == NULL) {
+ printf("MEMMGR::block_alloc failed.\n");
+ exit(1);
+ }
+ if(block_first == NULL) {
+ /* ����m�� */
+ block_no = 0;
+ block_first = p;
+ } else {
+ block_no = block_last->block_no + 1;
+ block_last->block_next = p;
+ p->block_prev = block_last;
+ }
+ block_last = &p[BLOCK_ALLOC - 1];
+ /* �u���b�N��A�������� */
+ for(i=0;i<BLOCK_ALLOC;i++) {
+ if(i != 0) {
+ p[i].block_prev = &p[i-1];
+ }
+ if(i != BLOCK_ALLOC -1) {
+ p[i].block_next = &p[i+1];
+ }
+ p[i].block_no = block_no + i;
+ }
+
+ /* ���g�p�u���b�N�ւ̃|�C���^���X�V */
+ block_unused = &p[1];
+ p->unit_size = 1;
+ return p;
+ }
+}
+
+static void block_free(struct block* p) {
+ /* free() �����ɁA���g�p�t���O��t���邾�� */
+ p->unit_size = 0;
+ /* ���g�p�|�C���^�[���X�V���� */
+ if(block_unused == NULL) {
+ block_unused = p;
+ } else if(block_unused->block_no > p->block_no) {
+ block_unused = p;
+ }
+}
+
+static char memmer_logfile[128];
+
+static FILE* memmgr_log(void) {
+ FILE *fp = fopen(memmer_logfile,"w");
+ if(!fp) { fp = stdout; }
+ fprintf(fp,"memmgr: memory leaks found\n");
+ return fp;
+}
+
+static void memmer_exit(void) {
+ FILE *fp = NULL;
+ int i;
+ int count = 0;
+ struct block *block = block_first;
+ struct unit_head_large *large = unit_head_large_first;
+ while(block) {
+ if(block->unit_size) {
+ if(!fp) { fp = memmgr_log(); }
+ for(i=0;i<block->unit_count;i++) {
+ struct unit_head *head = (struct unit_head*)(&block->data[block->unit_size * i]);
+ if(head->block != NULL) {
+ fprintf(
+ fp,"%04d : %s line %d size %d\n",++count,
+ head->file,head->line,head->size
+ );
+ }
+ }
+ }
+ block = block->block_next;
+ }
+ while(large) {
+ if(!fp) { fp = memmgr_log(); }
+ fprintf(
+ fp,"%04d : %s line %d size %d\n",++count,
+ large->unit_head.file,
+ large->unit_head.line,large->unit_head.size
+ );
+ large = large->next;
+ }
+ if(!fp) {
+ printf("memmgr: no memory leaks found.\n");
+ } else {
+ printf("memmgr: memory leaks found.\n");
+ }
+}
+
+int do_init_memmgr(const char* file) {
+ sprintf(memmer_logfile,"%s.log",file);
+ atexit(memmer_exit);
+ printf("memmgr: initialised: %s\n",memmer_logfile);
+ return 0;
+}
+
+#endif
diff --git a/src/common/malloc.h b/src/common/malloc.h
index d90665487..45451c9e0 100644
--- a/src/common/malloc.h
+++ b/src/common/malloc.h
@@ -59,15 +59,19 @@
void* aMalloc_( size_t size, const char *file, int line, const char *func );
void* aCalloc_( size_t num, size_t size, const char *file, int line, const char *func );
void* aRealloc_( void *p, size_t size, const char *file, int line, const char *func );
+ void aFree_( void *p, const char *file, int line, const char *func );
+ void* aStrdup_( const void *p, const char *file, int line, const char *func );
# define aMalloc(n) aMalloc_(n,ALC_MARK)
# define aMallocA(n) aMalloc_(n,ALC_MARK)
# define aCalloc(m,n) aCalloc_(m,n,ALC_MARK)
# define aCallocA(m,n) aCalloc_(m,n,ALC_MARK)
# define aRealloc(p,n) aRealloc_(p,n,ALC_MARK)
-# define aFree(ptr) free(ptr)
-# define aStrdup(ptr) strdup(ptr)
+# define aStrdup(p) aStrdup_(p,ALC_MARK)
+# define aFree(p) do { aFree_(p,ALC_MARK); if(p != NULL) { p = NULL; } } while(0)
#endif
+int do_init_memmgr(const char* file);
+
#endif
diff --git a/src/ladmin/Makefile b/src/ladmin/Makefile
index ebe67a349..20722350b 100644
--- a/src/ladmin/Makefile
+++ b/src/ladmin/Makefile
@@ -2,7 +2,7 @@ all: ladmin
txt: ladmin
sql: ladmin
-COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o ../common/strlib.o
+COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o ../common/obj/db.o ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/strlib.o
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/db.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h
ladmin: ladmin.o md5calc.o $(COMMON_OBJ)
diff --git a/src/login/Makefile b/src/login/Makefile
index 482503969..01810b1d1 100644
--- a/src/login/Makefile
+++ b/src/login/Makefile
@@ -1,7 +1,7 @@
all: login-server
txt: login-server
-COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/lock.o ../common/malloc.o ../common/showmsg.o ../common/strlib.o
+COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o ../common/obj/db.o ../common/obj/lock.o ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/strlib.o
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/db.h ../common/lock.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h
login-server: login.o md5calc.o $(COMMON_OBJ)
diff --git a/src/login_sql/Makefile b/src/login_sql/Makefile
index 18b023fe6..20b01c66d 100644
--- a/src/login_sql/Makefile
+++ b/src/login_sql/Makefile
@@ -2,7 +2,7 @@ all: login-server_sql
sql: login-server_sql
shared_libs=all
-COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o ../common/strlib.o
+COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o ../common/obj/db.o ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/strlib.o
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/db.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h
login-server_sql: login.o md5calc.o $(COMMON_OBJ)
diff --git a/src/map/Makefile b/src/map/Makefile
index 884e8b902..b413c8a62 100644
--- a/src/map/Makefile
+++ b/src/map/Makefile
@@ -10,7 +10,9 @@ txtobj:
sqlobj:
mkdir sqlobj
-COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/grfio.o ../common/db.o ../common/lock.o ../common/nullpo.o ../common/malloc.o ../common/showmsg.o ../common/utils.o ../common/strlib.o
+COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o ../common/obj/grfio.o ../common/obj/db.o ../common/obj/lock.o ../common/obj/nullpo.o ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/utils.o ../common/obj/strlib.o
+
+COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/grfio.h ../common/db.h ../common/lock.h ../common/nullpo.h ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h
LIBS = -lz -lm
map-server: txtobj/map.o txtobj/chrif.o txtobj/clif.o txtobj/pc.o txtobj/status.o txtobj/npc.o txtobj/npc_chat.o txtobj/chat.o txtobj/path.o txtobj/itemdb.o txtobj/mob.o txtobj/script.o txtobj/storage.o txtobj/skill.o txtobj/atcommand.o txtobj/charcommand.o txtobj/battle.o txtobj/intif.o txtobj/trade.o txtobj/party.o txtobj/vending.o txtobj/guild.o txtobj/pet.o txtobj/log.o $(COMMON_OBJ)
@@ -25,56 +27,56 @@ txtobj/%.o: %.c
sqlobj/%.o: %.c
$(COMPILE.c) $(OUTPUT_OPTION) $<
-txtobj/map.o: map.c map.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h pet.h atcommand.h ../common/core.h ../common/timer.h ../common/db.h ../common/grfio.h ../common/mmo.h ../common/showmsg.h
-txtobj/chrif.o: chrif.c map.h battle.h chrif.h clif.h intif.h pc.h npc.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-txtobj/clif.o: clif.c map.h chrif.h clif.h mob.h intif.h pc.h npc.h itemdb.h chat.h script.h storage.h party.h guild.h atcommand.h pet.h charcommand.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/showmsg.h
-txtobj/pc.o: pc.c map.h clif.h intif.h pc.h npc.h mob.h itemdb.h battle.h skill.h script.h party.h guild.h pet.h trade.h storage.h chat.h vending.h ../common/timer.h ../common/mmo.h ../common/db.h ../common/showmsg.h
-txtobj/status.o: status.c pc.h map.h clif.h status.h mob.h itemdb.h battle.h skill.h script.h pet.h guild.h ../common/timer.h ../common/mmo.h ../common/db.h ../common/showmsg.h
-txtobj/npc.o: npc.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h ../common/db.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-txtobj/npc_chat.o: npc_chat.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h ../common/db.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-txtobj/chat.o: chat.c map.h clif.h pc.h chat.h ../common/db.h ../common/mmo.h ../common/showmsg.h
-txtobj/path.o: path.c map.h battle.h ../common/mmo.h ../common/showmsg.h
-txtobj/itemdb.o: itemdb.c map.h battle.h itemdb.h ../common/db.h ../common/grfio.h ../common/mmo.h ../common/showmsg.h
-txtobj/mob.o: mob.c map.h clif.h intif.h pc.h mob.h skill.h battle.h npc.h itemdb.h ../common/timer.h ../common/socket.h ../common/mmo.h ../common/showmsg.h
-txtobj/script.o: script.c itemdb.h map.h pc.h mob.h clif.h intif.h npc.h script.h storage.h skill.h pet.h battle.h log.h ../common/timer.h ../common/socket.h ../common/db.h ../common/mmo.h ../common/lock.h ../common/showmsg.h
-txtobj/storage.o: storage.c itemdb.h pc.h clif.h intif.h storage.h guild.h ../common/mmo.h ../common/db.h ../common/showmsg.h
-txtobj/skill.o: skill.c skill.h map.h clif.h pc.h mob.h battle.h itemdb.h script.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-txtobj/atcommand.o: atcommand.c atcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-txtobj/battle.o: battle.c battle.h skill.h map.h mob.h pc.h pet.h guild.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-txtobj/intif.o: intif.c intif.h chrif.h clif.h party.h guild.h storage.h map.h battle.h pet.h ../common/socket.h ../common/mmo.h ../common/showmsg.h
-txtobj/trade.o: trade.c trade.h clif.h itemdb.h map.h pc.h npc.h ../common/mmo.h ../common/showmsg.h
-txtobj/party.o: party.c party.h clif.h intif.h pc.h map.h battle.h ../common/db.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-txtobj/vending.o: vending.c vending.h clif.h itemdb.h map.h pc.h ../common/mmo.h ../common/showmsg.h
-txtobj/guild.o: guild.c guild.h storage.h battle.h clif.h intif.h pc.h npc.h map.h ../common/db.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-txtobj/pet.o: pet.c pet.h map.h clif.h chrif.h intif.h pc.h itemdb.h battle.h mob.h npc.h script.h ../common/db.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-txtobj/log.o: log.c log.h map.h ../common/nullpo.h
-txtobj/charcommand.o: charcommand.c charcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+txtobj/map.o: map.c map.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h pet.h atcommand.h $(COMMON_H)
+txtobj/chrif.o: chrif.c map.h battle.h chrif.h clif.h intif.h pc.h npc.h $(COMMON_H)
+txtobj/clif.o: clif.c map.h chrif.h clif.h mob.h intif.h pc.h npc.h itemdb.h chat.h script.h storage.h party.h guild.h atcommand.h pet.h charcommand.h $(COMMON_H)
+txtobj/pc.o: pc.c map.h clif.h intif.h pc.h npc.h mob.h itemdb.h battle.h skill.h script.h party.h guild.h pet.h trade.h storage.h chat.h vending.h $(COMMON_H)
+txtobj/status.o: status.c pc.h map.h clif.h status.h mob.h itemdb.h battle.h skill.h script.h pet.h guild.h $(COMMON_H)
+txtobj/npc.o: npc.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h $(COMMON_H)
+txtobj/npc_chat.o: npc_chat.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h $(COMMON_H)
+txtobj/chat.o: chat.c map.h clif.h pc.h chat.h $(COMMON_H)
+txtobj/path.o: path.c map.h battle.h $(COMMON_H)
+txtobj/itemdb.o: itemdb.c map.h battle.h itemdb.h $(COMMON_H)
+txtobj/mob.o: mob.c map.h clif.h intif.h pc.h mob.h skill.h battle.h npc.h itemdb.h $(COMMON_H)
+txtobj/script.o: script.c itemdb.h map.h pc.h mob.h clif.h intif.h npc.h script.h storage.h skill.h pet.h battle.h log.h $(COMMON_H)
+txtobj/storage.o: storage.c itemdb.h pc.h clif.h intif.h storage.h guild.h $(COMMON_H)
+txtobj/skill.o: skill.c skill.h map.h clif.h pc.h mob.h battle.h itemdb.h script.h $(COMMON_H)
+txtobj/atcommand.o: atcommand.c atcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h $(COMMON_H)
+txtobj/battle.o: battle.c battle.h skill.h map.h mob.h pc.h pet.h guild.h $(COMMON_H)
+txtobj/intif.o: intif.c intif.h chrif.h clif.h party.h guild.h storage.h map.h battle.h pet.h $(COMMON_H)
+txtobj/trade.o: trade.c trade.h clif.h itemdb.h map.h pc.h npc.h $(COMMON_H)
+txtobj/party.o: party.c party.h clif.h intif.h pc.h map.h battle.h $(COMMON_H)
+txtobj/vending.o: vending.c vending.h clif.h itemdb.h map.h pc.h $(COMMON_H)
+txtobj/guild.o: guild.c guild.h storage.h battle.h clif.h intif.h pc.h npc.h map.h $(COMMON_H)
+txtobj/pet.o: pet.c pet.h map.h clif.h chrif.h intif.h pc.h itemdb.h battle.h mob.h npc.h script.h $(COMMON_H)
+txtobj/log.o: log.c log.h map.h $(COMMON_H)
+txtobj/charcommand.o: charcommand.c charcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h $(COMMON_H)
-sqlobj/map.o: map.c map.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h pet.h atcommand.h log.h ../common/core.h ../common/timer.h ../common/db.h ../common/grfio.h ../common/mmo.h ../common/showmsg.h
-sqlobj/chrif.o: chrif.c map.h battle.h chrif.h clif.h intif.h pc.h npc.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-sqlobj/clif.o: clif.c map.h chrif.h clif.h mob.h intif.h pc.h npc.h itemdb.h chat.h script.h storage.h party.h guild.h atcommand.h pet.h charcommand.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/showmsg.h
-sqlobj/pc.o: pc.c map.h clif.h intif.h pc.h npc.h mob.h itemdb.h battle.h skill.h script.h party.h guild.h pet.h trade.h storage.h chat.h vending.h log.h ../common/timer.h ../common/mmo.h ../common/db.h ../common/showmsg.h
-sqlobj/status.o: status.c pc.h map.h clif.h status.h mob.h itemdb.h battle.h skill.h script.h pet.h guild.h ../common/timer.h ../common/mmo.h ../common/db.h ../common/showmsg.h
-sqlobj/npc.o: npc.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h ../common/db.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-sqlobj/npc_chat.o: npc_chat.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h ../common/db.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-sqlobj/chat.o: chat.c map.h clif.h pc.h chat.h ../common/db.h ../common/mmo.h ../common/showmsg.h
-sqlobj/path.o: path.c map.h battle.h ../common/mmo.h ../common/showmsg.h
-sqlobj/itemdb.o: itemdb.c map.h battle.h itemdb.h ../common/db.h ../common/grfio.h ../common/mmo.h ../common/showmsg.h
-sqlobj/mob.o: mob.c map.h clif.h intif.h pc.h mob.h skill.h battle.h npc.h itemdb.h log.h ../common/timer.h ../common/socket.h ../common/mmo.h ../common/showmsg.h
-sqlobj/script.o: script.c itemdb.h map.h pc.h mob.h clif.h intif.h npc.h script.h storage.h skill.h pet.h battle.h log.h ../common/timer.h ../common/socket.h ../common/db.h ../common/mmo.h ../common/lock.h ../common/showmsg.h
-sqlobj/storage.o: storage.c itemdb.h pc.h clif.h intif.h storage.h guild.h ../common/mmo.h ../common/db.h ../common/showmsg.h
-sqlobj/skill.o: skill.c skill.h map.h clif.h pc.h mob.h battle.h itemdb.h script.h log.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-sqlobj/atcommand.o: atcommand.c atcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-sqlobj/battle.o: battle.c battle.h skill.h map.h mob.h pc.h pet.h guild.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-sqlobj/intif.o: intif.c intif.h chrif.h clif.h party.h guild.h storage.h map.h battle.h pet.h ../common/socket.h ../common/mmo.h ../common/showmsg.h
-sqlobj/trade.o: trade.c trade.h clif.h itemdb.h map.h pc.h npc.h log.h ../common/mmo.h ../common/showmsg.h
-sqlobj/party.o: party.c party.h clif.h intif.h pc.h map.h battle.h ../common/db.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-sqlobj/vending.o: vending.c vending.h clif.h itemdb.h map.h pc.h log.h ../common/mmo.h ../common/showmsg.h
-sqlobj/guild.o: guild.c guild.h storage.h battle.h clif.h intif.h pc.h npc.h map.h ../common/db.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-sqlobj/pet.o: pet.c pet.h map.h clif.h chrif.h intif.h pc.h itemdb.h battle.h mob.h npc.h script.h ../common/db.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-sqlobj/mail.o: mail.c mail.h ../common/showmsg.h ../common/strlib.h ../common/utils.h
-sqlobj/log.o: log.c log.h map.h ../common/nullpo.h
-sqlobj/charcommand.o: charcommand.c charcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+sqlobj/map.o: map.c map.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h pet.h atcommand.h log.h $(COMMON_H)
+sqlobj/chrif.o: chrif.c map.h battle.h chrif.h clif.h intif.h pc.h npc.h $(COMMON_H)
+sqlobj/clif.o: clif.c map.h chrif.h clif.h mob.h intif.h pc.h npc.h itemdb.h chat.h script.h storage.h party.h guild.h atcommand.h pet.h charcommand.h $(COMMON_H)
+sqlobj/pc.o: pc.c map.h clif.h intif.h pc.h npc.h mob.h itemdb.h battle.h skill.h script.h party.h guild.h pet.h trade.h storage.h chat.h vending.h log.h $(COMMON_H)
+sqlobj/status.o: status.c pc.h map.h clif.h status.h mob.h itemdb.h battle.h skill.h script.h pet.h guild.h $(COMMON_H)
+sqlobj/npc.o: npc.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h $(COMMON_H)
+sqlobj/npc_chat.o: npc_chat.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h $(COMMON_H)
+sqlobj/chat.o: chat.c map.h clif.h pc.h chat.h $(COMMON_H)
+sqlobj/path.o: path.c map.h battle.h $(COMMON_H)
+sqlobj/itemdb.o: itemdb.c map.h battle.h itemdb.h $(COMMON_H)
+sqlobj/mob.o: mob.c map.h clif.h intif.h pc.h mob.h skill.h battle.h npc.h itemdb.h log.h $(COMMON_H)
+sqlobj/script.o: script.c itemdb.h map.h pc.h mob.h clif.h intif.h npc.h script.h storage.h skill.h pet.h battle.h log.h $(COMMON_H)
+sqlobj/storage.o: storage.c itemdb.h pc.h clif.h intif.h storage.h guild.h $(COMMON_H)
+sqlobj/skill.o: skill.c skill.h map.h clif.h pc.h mob.h battle.h itemdb.h script.h log.h $(COMMON_H)
+sqlobj/atcommand.o: atcommand.c atcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h $(COMMON_H)
+sqlobj/battle.o: battle.c battle.h skill.h map.h mob.h pc.h pet.h guild.h $(COMMON_H)
+sqlobj/intif.o: intif.c intif.h chrif.h clif.h party.h guild.h storage.h map.h battle.h pet.h $(COMMON_H)
+sqlobj/trade.o: trade.c trade.h clif.h itemdb.h map.h pc.h npc.h log.h $(COMMON_H)
+sqlobj/party.o: party.c party.h clif.h intif.h pc.h map.h battle.h $(COMMON_H)
+sqlobj/vending.o: vending.c vending.h clif.h itemdb.h map.h pc.h log.h $(COMMON_H)
+sqlobj/guild.o: guild.c guild.h storage.h battle.h clif.h intif.h pc.h npc.h map.h $(COMMON_H)
+sqlobj/pet.o: pet.c pet.h map.h clif.h chrif.h intif.h pc.h itemdb.h battle.h mob.h npc.h script.h $(COMMON_H)
+sqlobj/mail.o: mail.c mail.h $(COMMON_H)
+sqlobj/log.o: log.c log.h map.h $(COMMON_H)
+sqlobj/charcommand.o: charcommand.c charcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h $(COMMON_H)
clean:
rm -rf *.o ../../map-server ../../map-server_sql sqlobj txtobj
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 12e6c2306..3169c75ab 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -9,6 +9,7 @@
#include "../common/timer.h"
#include "../common/nullpo.h"
#include "../common/mmo.h"
+#include "../common/db.h"
#include "log.h"
#include "clif.h"
@@ -210,6 +211,8 @@ ACMD_FUNC(gmotd); // Added by MC Cameri, created by davidsiaw
ACMD_FUNC(misceffect); // by MC Cameri
ACMD_FUNC(mobsearch);
ACMD_FUNC(cleanmap);
+ACMD_FUNC(npctalk);
+ACMD_FUNC(pettalk);
ACMD_FUNC(autoloot); // by Upa-Kun
#ifndef TXT_ONLY
@@ -484,6 +487,8 @@ static AtCommandInfo atcommand_info[] = {
{ AtCommand_MiscEffect, "@misceffect", 50, atcommand_misceffect }, // by MC Cameri
{ AtCommand_MobSearch, "@mobsearch", 0, atcommand_mobsearch },
{ AtCommand_CleanMap, "@cleanmap", 0, atcommand_cleanmap },
+ { AtCommand_NpcTalk, "@npctalk", 0, atcommand_npctalk },
+ { AtCommand_PetTalk, "@pettalk", 0, atcommand_pettalk },
#ifndef TXT_ONLY // sql-only commands
{ AtCommand_CheckMail, "@checkmail", 1, atcommand_listmail }, // [Valaris]
@@ -1743,8 +1748,8 @@ int atcommand_whozeny(
clif_displaymessage(fd, output);
}
- free(zeny);
- free(counted);
+ aFree(zeny);
+ aFree(counted);
return 0;
}
@@ -7790,6 +7795,49 @@ atcommand_cleanmap(
}
/*==========================================
+ * NPC/PET�ɘb������
+ *------------------------------------------
+ */
+int
+atcommand_npctalk(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char name[100],mes[100];
+ struct npc_data *nd;
+
+ if (sscanf(message, "%s %99[^\n]", name, mes) < 2)
+ return -1;
+
+ if (!(nd = npc_name2id(name)))
+ return -1;
+
+ clif_message(&nd->bl, mes);
+ return 0;
+}
+int
+atcommand_pettalk(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char mes[100],temp[100];
+ struct pet_data *pd;
+
+ nullpo_retr(-1, sd);
+
+ if(!sd->status.pet_id || !(pd=sd->pd))
+ return -1;
+
+ if (sscanf(message, "%99[^\n]", mes) < 1)
+ return -1;
+
+ snprintf(temp, sizeof temp ,"%s : %s",sd->pet.name,mes);
+ clif_message(&pd->bl, temp);
+
+ return 0;
+}
+
+/*==========================================
*
*------------------------------------------
*/
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index cb260db19..ea6849476 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -196,6 +196,8 @@ enum AtCommandType {
AtCommand_MiscEffect, // by MC Cameri
AtCommand_MobSearch,
AtCommand_CleanMap,
+ AtCommand_NpcTalk,
+ AtCommand_PetTalk,
// SQL-only commands start
#ifndef TXT_ONLY
diff --git a/src/map/battle.c b/src/map/battle.c
index 707362f7f..605fd30e0 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -59,15 +59,17 @@ int battle_counttargeted(struct block_list *bl,struct block_list *src,int target
// �_���[�W�̒x��
struct battle_delay_damage_ {
- struct block_list *src,*target;
+ struct block_list *src;
+ int target;
int damage;
int flag;
};
int battle_delay_damage_sub(int tid,unsigned int tick,int id,int data)
{
struct battle_delay_damage_ *dat=(struct battle_delay_damage_ *)data;
- if( dat && map_id2bl(id)==dat->src && dat->target->prev!=NULL)
- battle_damage(dat->src,dat->target,dat->damage,dat->flag);
+ struct block_list *target=map_id2bl(dat->target);
+ if( dat && map_id2bl(id)==dat->src && target && target->prev!=NULL)
+ battle_damage(dat->src,target,dat->damage,dat->flag);
aFree(dat);
return 0;
}
@@ -80,7 +82,7 @@ int battle_delay_damage(unsigned int tick,struct block_list *src,struct block_li
dat->src=src;
- dat->target=target;
+ dat->target=target->id;
dat->damage=damage;
dat->flag=flag;
add_timer(tick,battle_delay_damage_sub,src->id,(int)dat);
@@ -256,7 +258,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
flag&BF_SHORT && skill_num != NPC_GUIDEDATTACK) {
// �Z�[�t�e�B�E�H�[��
struct skill_unit *unit;
- unit = map_find_skill_unit_oncell(bl->m,bl->x,bl->y,MG_SAFETYWALL);
+ unit = (struct skill_unit *)sc_data[SC_SAFETYWALL].val2;
if (unit) {
if (unit->group && (--unit->group->val2)<=0)
skill_delunit(unit);
@@ -3501,7 +3503,7 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
if(sd && sd->splash_range > 0 && (wd.damage > 0 || wd.damage2 > 0) )
skill_castend_damage_id(src,target,0,-1,tick,0);
map_freeblock_lock();
- battle_damage(src,target,(wd.damage+wd.damage2),0);
+ battle_delay_damage(tick+wd.amotion,src,target,(wd.damage+wd.damage2),0);
if(target->prev != NULL &&
(target->type != BL_PC || (target->type == BL_PC && !pc_isdead((struct map_session_data *)target) ) ) ) {
if(wd.damage > 0 || wd.damage2 > 0) {
@@ -3652,7 +3654,7 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
}
if(rdamage > 0)
- battle_damage(target,src,rdamage,0);
+ battle_delay_damage(tick+wd.amotion,src,target,rdamage,0);
if(t_sc_data && t_sc_data[SC_AUTOCOUNTER].timer != -1 && t_sc_data[SC_AUTOCOUNTER].val4 > 0) {
if(t_sc_data[SC_AUTOCOUNTER].val3 == src->id)
battle_weapon_attack(target,src,tick,0x8000|t_sc_data[SC_AUTOCOUNTER].val1);
diff --git a/src/map/chrif.c b/src/map/chrif.c
index a04c483d5..bbc6a51e5 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -1011,6 +1011,8 @@ int chrif_disconnect(int fd) {
ShowWarning(tmp_output);
clif_foreachclient(chrif_disconnect_sub);
chrif_connected = 0;
+ // ����map �I�̃f�[�^������
+ map_eraseallipport();
}
close(fd);
return 0;
@@ -1146,6 +1148,15 @@ int check_connect_char_server(int tid, unsigned int tick, int id, int data) {
if (chrif_isconnect()) displayed = 0;
return 0;
}
+/*==========================================
+ * �I��
+ *------------------------------------------
+ */
+int do_final_chrif(void)
+{
+ delete_session(char_fd);
+ return 0;
+}
/*==========================================
*
diff --git a/src/map/chrif.h b/src/map/chrif.h
index 7f55d23d6..03ff83f6a 100644
--- a/src/map/chrif.h
+++ b/src/map/chrif.h
@@ -31,6 +31,7 @@ int chrif_changesex(int id, int sex);
int chrif_chardisconnect(struct map_session_data *sd);
int check_connect_char_server(int tid, unsigned int tick, int id, int data);
+int do_final_chrif(void);
int do_init_chrif(void);
int chrif_flush_fifo(void);
diff --git a/src/map/guild.c b/src/map/guild.c
index d0d7f14dd..ea9c3795f 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -477,8 +477,11 @@ int guild_recv_info(struct guild *sg)
// �C�x���g�̔���
if( (ev=numdb_search(guild_infoevent_db,sg->guild_id))!=NULL ){
numdb_erase(guild_infoevent_db,sg->guild_id);
- for(;ev;ev2=ev->next,aFree(ev),ev=ev2){
+ while(ev){
npc_event_do(ev->name);
+ ev2=ev->next;
+ aFree(ev);
+ ev=ev2;
}
}
@@ -1400,8 +1403,11 @@ int guild_castledataloadack(int castle_id,int index,int value)
}
if( (ev=numdb_search(guild_castleinfoevent_db,code))!=NULL ){
numdb_erase(guild_castleinfoevent_db,code);
- for(;ev;ev2=ev->next,aFree(ev),ev=ev2){
+ while(ev){
npc_event_do(ev->name);
+ ev2=ev->next;
+ aFree(ev);
+ ev=ev2;
}
}
return 1;
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 41e2e2a75..82149946d 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -379,8 +379,10 @@ static int itemdb_readdb(void)
id->equip_script = parse_script((unsigned char *) p,lines);
}
fclose(fp);
- sprintf(tmp_output,"Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,filename[i]);
- ShowStatus(tmp_output);
+ if (ln > 0) {
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,filename[i]);
+ ShowStatus(tmp_output);
+ }
ln=0; // reset to 0
}
return 0;
@@ -456,8 +458,10 @@ static int itemdb_read_randomitem()
ln++;
}
fclose(fp);
- sprintf(tmp_output,"Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",*pc,fn);
- ShowStatus(tmp_output);
+ if (*pc > 0) {
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",*pc,fn);
+ ShowStatus(tmp_output);
+ }
}
return 0;
@@ -699,8 +703,10 @@ static int itemdb_read_noequip(void)
}
fclose(fp);
- sprintf(tmp_output,"Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,"db/item_noequip.txt");
- ShowStatus(tmp_output);
+ if (ln > 0) {
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,"db/item_noequip.txt");
+ ShowStatus(tmp_output);
+ }
return 0;
}
diff --git a/src/map/map.c b/src/map/map.c
index ee597789c..d402ac06c 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -403,12 +403,13 @@ int map_count_oncell(int m, int x, int y) {
/*
* ����E���������̸�Ī���������E�˫ëȪ�����
*/
-struct skill_unit *map_find_skill_unit_oncell(int m,int x,int y,int skill_id)
+struct skill_unit *map_find_skill_unit_oncell(struct block_list *target,int x,int y,int skill_id,struct skill_unit *out_unit)
{
- int bx,by;
+ int m,bx,by;
struct block_list *bl;
int i,c;
struct skill_unit *unit;
+ m = target->m;
if (x < 0 || y < 0 || (x >= map[m].xs) || (y >= map[m].ys))
return NULL;
@@ -421,7 +422,10 @@ struct skill_unit *map_find_skill_unit_oncell(int m,int x,int y,int skill_id)
if (bl->x != x || bl->y != y || bl->type != BL_SKILL)
continue;
unit = (struct skill_unit *) bl;
- if (unit->alive && unit->group->skill_id == skill_id)
+ if (unit==out_unit || !unit->alive ||
+ !unit->group || unit->group->skill_id!=skill_id)
+ continue;
+ if (battle_check_target(&unit->bl,target,unit->group->target_flag)>0)
return unit;
}
return NULL;
@@ -1622,7 +1626,7 @@ struct map_session_data * map_nick2sd(char *nick) {
struct block_list * map_id2bl(int id)
{
struct block_list *bl=NULL;
- if(id<sizeof(objects)/sizeof(objects[0]))
+ if(id >= 0 && id < sizeof(objects)/sizeof(objects[0]))
bl = objects[id];
else
bl = (struct block_list*)numdb_search(id_db,id);
@@ -1826,7 +1830,7 @@ int map_getcell(int m,int x,int y,cell_t cellchk)
int map_getcellp(struct map_data* m,int x,int y,cell_t cellchk)
{
- int j;
+ int type;
nullpo_ret(m);
if(x<0 || x>=m->xs-1 || y<0 || y>=m->ys-1)
@@ -1834,24 +1838,28 @@ int map_getcellp(struct map_data* m,int x,int y,cell_t cellchk)
if(cellchk==CELL_CHKNOPASS) return 1;
return 0;
}
- j=x+y*m->xs;
+ type = m->gat[x+y*m->xs];
+ if (cellchk<0x10)
+ type &= CELL_MASK;
switch(cellchk)
{
case CELL_CHKPASS:
- return (m->gat[j] != 1 && m->gat[j] != 5);
+ return (type!=1 && type!=5);
case CELL_CHKNOPASS:
- return (m->gat[j] == 1 || m->gat[j] == 5);
+ return (type==1 || type==5);
case CELL_CHKWALL:
- return (m->gat[j] == 1);
- case CELL_CHKNPC:
- return (m->gat[j]&0x80);
+ return (type==1);
case CELL_CHKWATER:
- return (m->gat[j] == 3);
+ return (type==3);
case CELL_CHKGROUND:
- return (m->gat[j] == 5);
+ return (type==5);
case CELL_GETTYPE:
- return m->gat[j];
+ return type;
+ case CELL_CHKNPC:
+ return (type&CELL_NPC);
+ case CELL_CHKBASILICA:
+ return (type&CELL_BASILICA);
default:
return 0;
}
@@ -1868,10 +1876,20 @@ void map_setcell(int m,int x,int y,int cell)
return;
j=x+y*map[m].xs;
- if (cell == CELL_SETNPC)
- map[m].gat[j] |= 0x80;
- else
- map[m].gat[j] = cell;
+ switch (cell) {
+ case CELL_SETNPC:
+ map[m].gat[j] |= CELL_NPC;
+ break;
+ case CELL_SETBASILICA:
+ map[m].gat[j] |= CELL_BASILICA;
+ break;
+ case CELL_CLRBASILICA:
+ map[m].gat[j] &= ~CELL_BASILICA;
+ break;
+ default:
+ map[m].gat[j] = (map[m].gat[j]&~CELL_MASK) + cell;
+ break;
+ }
}
/*==========================================
@@ -1889,15 +1907,39 @@ int map_setipport(char *name,unsigned long ip,int port) {
mdos->gat = NULL;
mdos->ip = ip;
mdos->port = port;
+ mdos->map = NULL;
strdb_insert(map_db,mdos->name,mdos);
+ } else if(md->gat){
+ if(ip!=clif_getip() || port!=clif_getport()){
+ // �ǂݍ���ł������ǁA�S���O�ɂȂ����}�b�v
+ mdos=(struct map_data_other_server *)aCalloc(1,sizeof(struct map_data_other_server));
+ memcpy(mdos->name,name,24);
+ mdos->gat = NULL;
+ mdos->ip = ip;
+ mdos->port = port;
+ mdos->map = md;
+ strdb_insert(map_db,mdos->name,mdos);
+ // printf("from char server : %s -> %08lx:%d\n",name,ip,port);
+ } else {
+ // �ǂݍ���ł��āA�S���ɂȂ����}�b�v�i�������Ȃ��j
+ ;
+ }
} else {
- if(md->gat){ // local -> check data
- if(ip!=clif_getip() || port!=clif_getport()){
- printf("from char server : %s -> %08lx:%d\n",name,ip,port);
- return 1;
+ mdos=(struct map_data_other_server *)md;
+ if(ip == clif_getip() && port == clif_getport()) {
+ // �����̒S���ɂȂ����}�b�v
+ if(mdos->map == NULL) {
+ // �ǂݍ���ł��Ȃ��̂ŏI������
+ printf("map_setipport : %s is not loaded.\n",name);
+ exit(1);
+ } else {
+ // �ǂݍ���ł���̂Œu��������
+ md = mdos->map;
+ free(mdos);
+ strdb_insert(map_db,md->name,md);
}
- } else { // update
- mdos=(struct map_data_other_server *)md;
+ } else {
+ // ���̎I�̒S���}�b�v�Ȃ̂Œu�������邾��
mdos->ip = ip;
mdos->port = port;
}
@@ -1905,6 +1947,56 @@ int map_setipport(char *name,unsigned long ip,int port) {
return 0;
}
+/*==========================================
+ * ���I�Ǘ��̃}�b�v��S�č폜
+ *------------------------------------------
+ */
+int map_eraseallipport_sub(void *key,void *data,va_list va) {
+ struct map_data_other_server *mdos = (struct map_data_other_server*)data;
+ if(mdos->gat == NULL && mdos->map == NULL) {
+ strdb_erase(map_db,key);
+ free(mdos);
+ }
+ return 0;
+}
+
+int map_eraseallipport(void) {
+ strdb_foreach(map_db,map_eraseallipport_sub);
+ return 1;
+}
+
+/*==========================================
+ * ���I�Ǘ��̃}�b�v��db����폜
+ *------------------------------------------
+ */
+int map_eraseipport(char *name,unsigned long ip,int port)
+{
+ struct map_data *md;
+ struct map_data_other_server *mdos;
+// unsigned char *p=(unsigned char *)&ip;
+
+ md=strdb_search(map_db,name);
+ if(md){
+ if(md->gat) // local -> check data
+ return 0;
+ else {
+ mdos=(struct map_data_other_server *)md;
+ if(mdos->ip==ip && mdos->port == port) {
+ if(mdos->map) {
+ // ���̃}�b�v�I�ł��ǂݍ���ł���̂ňړ��ł���
+ return 1; // �Ăяo������ chrif_sendmap() ������
+ } else {
+ strdb_erase(map_db,name);
+ free(mdos);
+ }
+// if(battle_config.etc_log)
+// printf("erase map %s %d.%d.%d.%d:%d\n",name,p[0],p[1],p[2],p[3],port);
+ }
+ }
+ }
+ return 0;
+}
+
// ����������
/*==========================================
* ���ꍂ���ݒ�
@@ -2043,7 +2135,7 @@ static void map_cache_close(void)
fwrite(map_cache.map,map_cache.head.nmaps,sizeof(struct map_cache_info),map_cache.fp);
}
fclose(map_cache.fp);
- free(map_cache.map);
+ aFree(map_cache.map);
map_cache.fp = NULL;
return;
}
@@ -2085,16 +2177,16 @@ int map_cache_read(struct map_data *m)
if(fread(buf,1,size_compress,map_cache.fp) != size_compress) {
// �Ȃ����t�@�C���㔼�������Ă�̂œǂݒ���
printf("fread error\n");
- m->xs = 0; m->ys = 0; m->gat = NULL;
- free(m->gat); free(buf);
+ free(m->gat); m->xs = 0; m->ys = 0; m->gat = NULL;
+ free(buf);
return 0;
}
dest_len = m->xs * m->ys;
decode_zip(m->gat,&dest_len,buf,size_compress);
if(dest_len != map_cache.map[i].xs * map_cache.map[i].ys) {
// ����ɉ𓀂��o���ĂȂ�
- m->xs = 0; m->ys = 0; m->gat = NULL;
- free(m->gat); free(buf);
+ free(m->gat); m->xs = 0; m->ys = 0; m->gat = NULL;
+ free(buf);
return 0;
}
free(buf);
@@ -3069,7 +3161,7 @@ void do_final(void) {
strdb_final(nick_db, nick_db_final);
numdb_final(charid_db, charid_db_final);
-
+ do_final_chrif(); // ���̓����ŃL������S�Đؒf����
do_final_script();
do_final_itemdb();
do_final_storage();
diff --git a/src/map/map.h b/src/map/map.h
index 2963a316e..96cbc9fb3 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -20,7 +20,7 @@
#define MAX_STATUSCHANGE 210
#define MAX_SKILLUNITGROUP 32
#define MAX_MOBSKILLUNITGROUP 8
-#define MAX_SKILLUNITGROUPTICKSET 128
+#define MAX_SKILLUNITGROUPTICKSET 32
#define MAX_SKILLTIMERSKILL 32
#define MAX_MOBSKILLTIMERSKILL 10
#define MAX_MOBSKILL 32
@@ -85,13 +85,13 @@ struct skill_unit_group {
int src_id;
int party_id;
int guild_id;
- int map,range;
+ int map;
int target_flag;
unsigned int tick;
int limit,interval;
int skill_id,skill_lv;
- int val1,val2;
+ int val1,val2,val3;
char *valstr;
int unit_id;
int group_id;
@@ -582,6 +582,7 @@ struct map_data_other_server {
unsigned char *gat; // NULL�Œ�ɂ��Ĕ��f
unsigned long ip;
unsigned int port;
+ struct map_data* map;
};
struct flooritem_data {
@@ -646,20 +647,29 @@ enum {
LOOK_BASE,LOOK_HAIR,LOOK_WEAPON,LOOK_HEAD_BOTTOM,LOOK_HEAD_TOP,LOOK_HEAD_MID,LOOK_HAIR_COLOR,LOOK_CLOTHES_COLOR,LOOK_SHIELD,LOOK_SHOES
};
+// CELL
+#define CELL_MASK 0x0f
+#define CELL_NPC 0x80 // NPC�Z��
+#define CELL_BASILICA 0x40 // BASILICA�Z��
/*
- * map_getcell()�����Ī����ի髰
+ * map_getcell()�Ŏg�p�����t���O
*/
typedef enum {
- CELL_CHKWALL=1, // ��(���뫿����1)
- CELL_CHKWATER=3, // ���(���뫿����3)
- CELL_CHKGROUND=5, // ������ڪ(���뫿����5)
- CELL_CHKNPC=0x80, // ���ë������ת�NPC(���뫿����0x80�ի髰)
- CELL_CHKPASS, // ��Φʦ��(���뫿����1,5���)
- CELL_CHKNOPASS, // ��Φ��ʦ(���뫿����1,5)
- CELL_GETTYPE // ���뫿���ת�����
+ CELL_CHKWALL=0, // ��(�Z���^�C�v1)
+ CELL_CHKWATER, // ����(�Z���^�C�v3)
+ CELL_CHKGROUND, // �n�ʏ�Q��(�Z���^�C�v5)
+ CELL_CHKPASS, // �ʉ߉”\(�Z���^�C�v1,5�ȊO)
+ CELL_CHKNOPASS, // �ʉߕs��(�Z���^�C�v1,5)
+ CELL_GETTYPE, // �Z���^�C�v��Ԃ�
+ CELL_CHKNPC=0x10, // �^�b�`�^�C�v��NPC(�Z���^�C�v0x80�t���O)
+ CELL_CHKBASILICA, // �o�W���J(�Z���^�C�v0x40�t���O)
} cell_t;
-// map_setcell()�����Ī����ի髰
-#define CELL_SETNPC 0x80 // ���ë������ת�NPC�򫻫ë�
+// map_setcell()�Ŏg�p�����t���O
+enum {
+ CELL_SETNPC=0x10, // �^�b�`�^�C�v��NPC���Z�b�g
+ CELL_SETBASILICA, // �o�W���J���Z�b�g
+ CELL_CLRBASILICA, // �o�W���J���N���A
+};
struct chat_data {
struct block_list bl;
@@ -718,7 +728,7 @@ void map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int
int map_countnearpc(int,int,int);
//block�֘A�ɒlj�
int map_count_oncell(int m,int x,int y);
-struct skill_unit *map_find_skill_unit_oncell(int m,int x,int y,int skill_id);
+struct skill_unit *map_find_skill_unit_oncell(struct block_list *,int x,int y,int skill_id,struct skill_unit *);
// �ꎞ�Iobject�֘A
int map_addobject(struct block_list *);
int map_delobject(int);
@@ -747,6 +757,7 @@ int map_mapname2mapid(char*);
int map_mapname2ipport(char*,int*,int*);
int map_setipport(char *name,unsigned long ip,int port);
int map_eraseipport(char *name,unsigned long ip,int port);
+int map_eraseallipport(void);
void map_addiddb(struct block_list *);
void map_deliddb(struct block_list *bl);
int map_foreachiddb(int (*)(void*,void*,va_list),...);
diff --git a/src/map/mob.c b/src/map/mob.c
index 74a1c5889..9b2f91da1 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -496,10 +496,16 @@ static int mob_walk(struct mob_data *md,unsigned int tick,int data)
dx = dirx[md->dir];
dy = diry[md->dir];
- if(map_getcell(md->bl.m,x+dx,y+dy,CELL_CHKNOPASS)) {
+ if (map_getcell(md->bl.m,x+dx,y+dy,CELL_CHKBASILICA) && !(status_get_mode(&md->bl)&0x20)) {
+ mob_stop_walking(md,1);
+ return 0;
+ }
+
+ if (map_getcell(md->bl.m,x+dx,y+dy,CELL_CHKNOPASS)) {
mob_walktoxy_sub(md);
return 0;
}
+
if (skill_check_basilica (&md->bl,x+dx,y+dy) ||
skill_check_moonlit (&md->bl,x+dx,y+dy)) {
mob_walktoxy_sub(md);
@@ -515,18 +521,18 @@ static int mob_walk(struct mob_data *md,unsigned int tick,int data)
if(md->min_chase>13)
md->min_chase--;
+ skill_unit_move(&md->bl,tick,0);
if(moveblock) map_delblock(&md->bl);
md->bl.x = x;
md->bl.y = y;
if(moveblock) map_addblock(&md->bl);
+ skill_unit_move(&md->bl,tick,1);
map_foreachinmovearea(clif_mobinsight,md->bl.m,x-AREA_SIZE,y-AREA_SIZE,x+AREA_SIZE,y+AREA_SIZE,-dx,-dy,BL_PC,md);
md->state.state=MS_IDLE;
if(md->option&4)
skill_check_cloaking(&md->bl);
-
- skill_unit_move(&md->bl,tick,1); // �X�L�����j�b�g�̌���
}
if((i=calc_next_walk_step(md))>0){
i = i>>1;
@@ -712,7 +718,7 @@ int mob_changestate(struct mob_data *md,int state,int type)
md->last_deadtime=gettick();
// Since it died, all aggressors' attack to this mob is stopped.
clif_foreachclient(mob_stopattacked,md->bl.id);
- skill_unit_out_all(&md->bl,gettick(),1);
+ skill_unit_move(&md->bl,gettick(),0);
status_change_clear(&md->bl,2); // �X�e�[�^�X�ُ����������
skill_clear_unitgroup(&md->bl); // �S�ẴX�L�����j�b�g�O���[�v���폜����
skill_cleartimerskill(&md->bl);
@@ -789,11 +795,21 @@ static int mob_timer(int tid,unsigned int tick,int id,int data)
static int mob_walktoxy_sub(struct mob_data *md)
{
struct walkpath_data wpd;
+ int x,y;
+ static int dirx[8]={0,-1,-1,-1,0,1,1,1};
+ static int diry[8]={1,1,0,-1,-1,-1,0,1};
nullpo_retr(0, md);
if(path_search(&wpd,md->bl.m,md->bl.x,md->bl.y,md->to_x,md->to_y,md->state.walk_easy))
return 1;
+ x = md->bl.x+dirx[wpd.path[0]];
+ y = md->bl.y+diry[wpd.path[0]];
+ if (map_getcell(md->bl.m,x,y,CELL_CHKBASILICA) && !(status_get_mode(&md->bl)&0x20)) {
+ md->state.change_walk_target=0;
+ return 1;
+ }
+
memcpy(&md->walkpath,&wpd,sizeof(wpd));
md->state.change_walk_target=0;
@@ -909,7 +925,7 @@ int mob_spawn(int id)
md->last_spawntime=tick;
if( md->bl.prev!=NULL ){
// clif_clearchar_area(&md->bl,3);
- skill_unit_out_all(&md->bl,gettick(),1);
+// skill_unit_move(&md->bl,tick,0);
map_delblock(&md->bl);
}
else
@@ -939,8 +955,6 @@ int mob_spawn(int id)
md->dir=0;
md->target_dir=0;
- map_addblock(&md->bl);
-
memset(&md->state,0,sizeof(md->state));
md->attacked_id = 0;
md->target_id = 0;
@@ -1003,6 +1017,9 @@ int mob_spawn(int id)
md->hp = status_get_max_hp(&md->bl);
}
+ map_addblock(&md->bl);
+ skill_unit_move(&md->bl,tick,1);
+
clif_spawnmob(md);
return 0;
@@ -2876,6 +2893,7 @@ int mob_warpslave(struct mob_data *md,int x, int y)
int mob_warp(struct mob_data *md,int m,int x,int y,int type)
{
int i=0,xs=0,ys=0,bx=x,by=y;
+ int tick = gettick();
nullpo_retr(0, md);
@@ -2889,7 +2907,7 @@ int mob_warp(struct mob_data *md,int m,int x,int y,int type)
return 0;
clif_clearchar_area(&md->bl,type);
}
- skill_unit_out_all(&md->bl,gettick(),1);
+ skill_unit_move(&md->bl,tick,0);
map_delblock(&md->bl);
if(bx>0 && by>0){ // �ʒu�w��̏ꍇ���͂X�Z����T��
@@ -2928,6 +2946,7 @@ int mob_warp(struct mob_data *md,int m,int x,int y,int type)
}
map_addblock(&md->bl);
+ skill_unit_move(&md->bl,tick,1);
if(type>0)
{
clif_spawnmob(md);
@@ -3241,59 +3260,16 @@ int mobskill_castend_pos( int tid, unsigned int tick, int id,int data )
return 0;
}
- if(battle_config.monster_skill_reiteration == 0) {
- range = -1;
- switch(md->skillid) {
- case MG_SAFETYWALL:
- case WZ_FIREPILLAR:
- case HT_SKIDTRAP:
- case HT_LANDMINE:
- case HT_ANKLESNARE:
- case HT_SHOCKWAVE:
- case HT_SANDMAN:
- case HT_FLASHER:
- case HT_FREEZINGTRAP:
- case HT_BLASTMINE:
- case HT_CLAYMORETRAP:
- case PF_SPIDERWEB: /* �X�p�C�_�[�E�F�b�u */
- range = 0;
- break;
- case AL_PNEUMA:
- case AL_WARP:
- range = 1;
- break;
- }
- if(range >= 0) {
- if(skill_check_unit_range(md->bl.m,md->skillx,md->skilly,range,md->skillid) > 0)
- return 0;
- }
- }
- if(battle_config.monster_skill_nofootset) {
- range = -1;
- switch(md->skillid) {
- case WZ_FIREPILLAR:
- case HT_SKIDTRAP:
- case HT_LANDMINE:
- case HT_ANKLESNARE:
- case HT_SHOCKWAVE:
- case HT_SANDMAN:
- case HT_FLASHER:
- case HT_FREEZINGTRAP:
- case HT_BLASTMINE:
- case HT_CLAYMORETRAP:
- case AM_DEMONSTRATION:
- case PF_SPIDERWEB: /* �X�p�C�_�[�E�F�b�u */
- range = 1;
- break;
- case AL_WARP:
- range = 0;
- break;
- }
- if(range >= 0) {
- if(skill_check_unit_range2(md->bl.m,md->skillx,md->skilly,range) > 0)
- return 0;
- }
- }
+ if (!battle_config.monster_skill_reiteration &&
+ skill_get_unit_flag(md->skillid)&UF_NOREITERATION &&
+ skill_check_unit_range(md->bl.m,md->skillx,md->skilly,md->skillid,md->skilllv))
+ return 0;
+
+ if(battle_config.monster_skill_nofootset &&
+ skill_get_unit_flag(md->skillid)&UF_NOFOOTSET &&
+ skill_check_unit_range2(md->bl.m,md->skillx,md->skilly,md->skillid,md->skilllv))
+ return 0;
+
if(battle_config.monster_land_skill_limit) {
maxcount = skill_get_maxcount(md->skillid);
diff --git a/src/map/path.c b/src/map/path.c
index dae7fc59a..92ea4941e 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -273,7 +273,7 @@ int path_search_long(int m,int x0,int y0,int x1,int y1)
else
weight = abs(y1 - y0);
- while (x0 != x1 && y0 != y1) {
+ while (x0 != x1 || y0 != y1) {
if (map_getcellp(md,x0,y0,CELL_CHKWALL))
return 0;
wx += dx;
diff --git a/src/map/pc.c b/src/map/pc.c
index 416e05f97..0a5ef8a67 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -140,6 +140,7 @@ static int pc_invincible_timer(int tid,unsigned int tick,int id,int data) {
return 0;
}
sd->invincible_timer=-1;
+ skill_unit_move(&sd->bl,tick,1);
return 0;
}
@@ -160,6 +161,7 @@ int pc_delinvincibletimer(struct map_session_data *sd) {
delete_timer(sd->invincible_timer,pc_invincible_timer);
sd->invincible_timer = -1;
}
+ skill_unit_move(&sd->bl,gettick(),1);
return 0;
}
@@ -2244,7 +2246,12 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount)
i = pc_search_inventory(sd,0);
if(i >= 0) {
memcpy(&sd->status.inventory[i],item_data,sizeof(sd->status.inventory[0]));
- sd->status.inventory[i].amount=amount;
+ if(itemdb_isequip2(data)){
+ sd->status.inventory[i].amount=1;
+ amount=1;
+ } else {
+ sd->status.inventory[i].amount=amount;
+ }
sd->inventory_data[i]=data;
clif_additem(sd,i,amount,0);
}
@@ -2480,7 +2487,12 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun
for(i=0;i<MAX_CART;i++){
if(sd->status.cart[i].nameid==0){
memcpy(&sd->status.cart[i],item_data,sizeof(sd->status.cart[0]));
- sd->status.cart[i].amount=amount;
+ if(itemdb_isequip2(data)){
+ sd->status.inventory[i].amount=1;
+ amount=1;
+ } else {
+ sd->status.inventory[i].amount=amount;
+ }
sd->cart_num++;
clif_cart_additem(sd,i,amount,0);
break;
@@ -2877,6 +2889,13 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt
status_change_end(&sd->bl,SC_BLADESTOP,-1);
if(sd->sc_data[SC_DANCING].timer!=-1) // clear dance effect when warping [Valaris]
skill_stop_dancing(&sd->bl,0);
+ if (sd->sc_data[SC_BASILICA].timer!=-1) {
+ int i;
+ for (i=0;i<MAX_SKILLUNITGROUP;i++)
+ if (sd->skillunit[i].skill_id==HP_BASILICA)
+ skill_delunitgroup(&sd->skillunit[i]);
+ status_change_end(&sd->bl,SC_BASILICA,-1);
+ }
}
if(sd->status.option&2)
@@ -2910,7 +2929,7 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt
int ip,port;
if(map_mapname2ipport(mapname,&ip,&port)==0){
skill_stop_dancing(&sd->bl,1);
- skill_unit_out_all(&sd->bl,gettick(),1);
+ skill_unit_move(&sd->bl,gettick(),0);
clif_clearchar_area(&sd->bl,clrtype&0xffff);
skill_gangsterparadise(sd,0);
map_delblock(&sd->bl);
@@ -2966,7 +2985,7 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt
}
if(sd->mapname[0] && sd->bl.prev != NULL){
- skill_unit_out_all(&sd->bl,gettick(),1);
+ skill_unit_move(&sd->bl,gettick(),0);
clif_clearchar_area(&sd->bl,clrtype&0xffff);
skill_gangsterparadise(sd,0);
map_delblock(&sd->bl);
@@ -3199,10 +3218,12 @@ static int pc_walk(int tid,unsigned int tick,int id,int data)
x += dx;
y += dy;
+ skill_unit_move(&sd->bl,tick,0);
if(moveblock) map_delblock(&sd->bl);
sd->bl.x = x;
sd->bl.y = y;
if(moveblock) map_addblock(&sd->bl);
+ skill_unit_move(&sd->bl,tick,1);
#if 0
if (sd->status.guild_id > 0) {
@@ -3250,20 +3271,15 @@ static int pc_walk(int tid,unsigned int tick,int id,int data)
if (sd->sc_data[SC_DEVOTION].val1)
skill_devotion2(&sd->bl,sd->sc_data[SC_DEVOTION].val1);
- if (sd->sc_data[SC_BASILICA].timer != -1) { // Basilica cancels if caster moves [celest]
- struct skill_unit *su;
- if ((su = (struct skill_unit *)sd->sc_data[SC_BASILICA].val4)) {
- struct skill_unit_group *sg;
- if ((sg = su->group) && sg->src_id == sd->bl.id) {
- status_change_end(&sd->bl,SC_BASILICA,-1);
- skill_delunitgroup (sg);
- }
- }
+ if (sd->sc_data[SC_BASILICA].timer!=-1) { // Basilica cancels if caster moves [celest]
+ int i;
+ for (i=0;i<MAX_SKILLUNITGROUP;i++)
+ if (sd->skillunit[i].skill_id==HP_BASILICA)
+ skill_delunitgroup(&sd->skillunit[i]);
+ status_change_end(&sd->bl,SC_BASILICA,-1);
}
}
- skill_unit_move(&sd->bl,tick,1); // �X�L�����j�b�g��?��
-
if(map_getcell(sd->bl.m,x,y,CELL_CHKNPC))
npc_touch_areanpc(sd,sd->bl.m,x,y);
else
@@ -3420,7 +3436,8 @@ int pc_randomwalk(struct map_session_data *sd,int tick)
int pc_movepos(struct map_session_data *sd,int dst_x,int dst_y)
{
int moveblock;
- int dx,dy,dist;
+ int dx,dy;
+ int tick = gettick();
struct walkpath_data wpd;
@@ -3433,16 +3450,17 @@ int pc_movepos(struct map_session_data *sd,int dst_x,int dst_y)
dx = dst_x - sd->bl.x;
dy = dst_y - sd->bl.y;
- dist = distance(sd->bl.x,sd->bl.y,dst_x,dst_y);
moveblock = ( sd->bl.x/BLOCK_SIZE != dst_x/BLOCK_SIZE || sd->bl.y/BLOCK_SIZE != dst_y/BLOCK_SIZE);
map_foreachinmovearea(clif_pcoutsight,sd->bl.m,sd->bl.x-AREA_SIZE,sd->bl.y-AREA_SIZE,sd->bl.x+AREA_SIZE,sd->bl.y+AREA_SIZE,dx,dy,0,sd);
+ skill_unit_move(&sd->bl,tick,0);
if(moveblock) map_delblock(&sd->bl);
sd->bl.x = dst_x;
sd->bl.y = dst_y;
if(moveblock) map_addblock(&sd->bl);
+ skill_unit_move(&sd->bl,tick,1);
map_foreachinmovearea(clif_pcinsight,sd->bl.m,sd->bl.x-AREA_SIZE,sd->bl.y-AREA_SIZE,sd->bl.x+AREA_SIZE,sd->bl.y+AREA_SIZE,-dx,-dy,0,sd);
@@ -3459,8 +3477,6 @@ int pc_movepos(struct map_session_data *sd,int dst_x,int dst_y)
if(sd->status.option&4) // �N��?�L���O�̏���?��
skill_check_cloaking(&sd->bl);
- skill_unit_move(&sd->bl,gettick(),dist+7); // �X�L�����j�b�g��?��
-
if(map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNPC))
npc_touch_areanpc(sd,sd->bl.m,sd->bl.x,sd->bl.y);
else
@@ -3781,7 +3797,7 @@ int pc_attack(struct map_session_data *sd,int target_id,int type)
return 0;
}
- if(!battle_check_target(&sd->bl,bl,BCT_ENEMY))
+ if(battle_check_target(&sd->bl,bl,BCT_ENEMY) <= 0)
return 1;
if(sd->attacktimer != -1)
pc_stopattack(sd);
@@ -4612,7 +4628,7 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
skill_castcancel(&sd->bl,0); // �r���̒��~
clif_clearchar_area(&sd->bl,1);
pc_setdead(sd);
- skill_unit_out_all(&sd->bl,gettick(),1);
+ skill_unit_move(&sd->bl,gettick(),0);
if(sd->sc_data[SC_BLADESTOP].timer!=-1)//���n�͎��O�ɉ���
status_change_end(&sd->bl,SC_BLADESTOP,-1);
pc_setglobalreg(sd,"PC_DIE_COUNTER",++sd->die_counter); //���ɃJ�E���^?����?��
@@ -4967,7 +4983,21 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
sd->status.status_point = val;
break;
case SP_ZENY:
- sd->status.zeny = val;
+ if(val <= MAX_ZENY) {
+ // MAX_ZENY �ȉ��Ȃ���
+ sd->status.zeny = val;
+ } else {
+ if(sd->status.zeny > val) {
+ // Zeny ���������Ă���Ȃ���
+ sd->status.zeny = val;
+ } else if(sd->status.zeny <= MAX_ZENY) {
+ // Zeny ���������Ă��āA���݂̒l��MAX_ZENY �ȉ��Ȃ�MAX_ZENY
+ sd->status.zeny = MAX_ZENY;
+ } else {
+ // Zeny ���������Ă��āA���݂̒l��MAX_ZENY ��艺�Ȃ瑝�����𖳎�
+ ;
+ }
+ }
break;
case SP_BASEEXP:
if(pc_nextbaseexp(sd) > 0) {
@@ -5761,6 +5791,7 @@ int pc_setaccountreg2(struct map_session_data *sd,char *reg,int val)
int pc_eventtimer(int tid,unsigned int tick,int id,int data)
{
struct map_session_data *sd=map_id2sd(id);
+ char *p = (char *)data;
int i;
if(sd==NULL)
return 0;
@@ -5768,11 +5799,11 @@ int pc_eventtimer(int tid,unsigned int tick,int id,int data)
for(i=0;i<MAX_EVENTTIMER;i++){
if( sd->eventtimer[i]==tid ){
sd->eventtimer[i]=-1;
- npc_event(sd,(const char *)data,0);
+ npc_event(sd,p,0);
break;
}
}
- aFree((void *)data);
+ aFree(p);
if(i==MAX_EVENTTIMER) {
if(battle_config.error_log)
printf("pc_eventtimer: no such event timer\n");
@@ -5795,8 +5826,9 @@ int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name)
if( sd->eventtimer[i]==-1 )
break;
if(i<MAX_EVENTTIMER){
- char *evname=(char *)aMallocA((strlen(name)+1)*sizeof(char));
- memcpy(evname,name,(strlen(name)+1));
+ char *evname=strdup(name);
+ //char *evname=(char *)aMallocA((strlen(name)+1)*sizeof(char));
+ //memcpy(evname,name,(strlen(name)+1));
sd->eventtimer[i]=add_timer(gettick()+tick,
pc_eventtimer,sd->bl.id,(int)evname);
sd->eventcount++;
@@ -5819,12 +5851,15 @@ int pc_deleventtimer(struct map_session_data *sd,const char *name)
return 0;
for(i=0;i<MAX_EVENTTIMER;i++)
- if( sd->eventtimer[i]!=-1 && strcmp(
- (char *)(get_timer(sd->eventtimer[i])->data), name)==0 ){
+ if( sd->eventtimer[i]!=-1 ) {
+ char *p = (char *)(get_timer(sd->eventtimer[i])->data);
+ if(strcmp(p, name)==0) {
delete_timer(sd->eventtimer[i],pc_eventtimer);
sd->eventtimer[i]=-1;
sd->eventcount--;
+ free(p);
break;
+ }
}
return 0;
@@ -5865,8 +5900,10 @@ int pc_cleareventtimer(struct map_session_data *sd)
for(i=0;i<MAX_EVENTTIMER;i++)
if( sd->eventtimer[i]!=-1 ){
+ char *p = (char *)(get_timer(sd->eventtimer[i])->data);
delete_timer(sd->eventtimer[i],pc_eventtimer);
sd->eventtimer[i]=-1;
+ free(p);
}
return 0;
diff --git a/src/map/skill.c b/src/map/skill.c
index 9ae3e2ba4..3d3411b16 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -556,6 +556,12 @@ int skill_get_mhp( int id ,int lv ){ skill_get (skill_db[id].mhp[lv-1], id, lv);
int skill_get_castnodex( int id ,int lv ){ skill_get (skill_db[id].castnodex[lv-1], id, lv); }
int skill_get_delaynodex( int id ,int lv ){ skill_get (skill_db[id].delaynodex[lv-1], id, lv); }
int skill_get_nocast ( int id ){ skill_get (skill_db[id].nocast, id, 1); }
+int skill_get_unit_id ( int id, int flag ){ skill_get (skill_db[id].unit_id[flag], id, 1); }
+int skill_get_unit_layout_type( int id ,int lv ){ skill_get (skill_db[id].unit_layout_type[lv-1], id, lv); }
+int skill_get_unit_interval( int id ){ skill_get (skill_db[id].unit_interval, id, 1); }
+int skill_get_unit_range( int id ){ skill_get (skill_db[id].unit_range, id, 1); }
+int skill_get_unit_target( int id ){ skill_get (skill_db[id].unit_target, id, 1); }
+int skill_get_unit_flag( int id ){ skill_get (skill_db[id].unit_flag, id, 1); }
int skill_tree_get_max(int id, int b_class){
struct pc_base_job s_class = pc_calc_base_job(b_class);
@@ -577,6 +583,9 @@ int skill_clear_element_field(struct block_list *bl);
int skill_landprotector(struct block_list *bl, va_list ap );
int skill_trap_splash(struct block_list *bl, va_list ap );
int skill_count_target(struct block_list *bl, va_list ap );
+struct skill_unit_group_tickset *skill_unitgrouptickset_search(struct block_list *bl,struct skill_unit_group *sg,int tick);
+int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int tick);
+int skill_unit_effect(struct block_list *bl,va_list ap);
// [MouseJstr] - skill ok to cast? and when?
int skillnotok(int skillid, struct map_session_data *sd)
@@ -635,96 +644,53 @@ static int distance(int x0,int y0,int x1,int y1)
return dx>dy ? dx : dy;
}
-/* �X�L�����j�b�gID��Ԃ��i������f?�^�x?�X�ɓ��ꂽ���ȁj */
-int skill_get_unit_id(int id,int flag)
+/* �X�L�����j�b�g�̔z�u����Ԃ� */
+struct skill_unit_layout skill_unit_layout[MAX_SKILL_UNIT_LAYOUT];
+int firewall_unit_pos;
+int icewall_unit_pos;
+
+struct skill_unit_layout *skill_get_unit_layout(int skillid,int skilllv,struct block_list *src,int x,int y)
{
+
+ int pos = skill_get_unit_layout_type(skillid,skilllv);
+ int dir;
- switch(id){
- case MG_SAFETYWALL: return 0x7e; /* �Z�C�t�e�B�E�H?�� */
- case MG_FIREWALL: return 0x7f; /* �t�@�C�A?�E�H?�� */
- case AL_WARP: return (flag==0)?0x81:0x80; /* ��?�v�|?�^�� */
- case PR_BENEDICTIO: return 0x82; /* ��?�~�� */
- case PR_SANCTUARY: return 0x83; /* �T���N�`���A�� */
- case PR_MAGNUS: return 0x84; /* �}�O�k�X�G�N�\�V�Y�� */
- case AL_PNEUMA: return 0x85; /* �j��?�} */
- case MG_THUNDERSTORM: return 0x86; /* �T���_?�X�g?�� */
- case WZ_HEAVENDRIVE: return 0x86; /* �w�����Y�h���C�u */
- case WZ_SIGHTRASHER: return 0x86; /* �T�C�g���b�V��? */
- case WZ_METEOR: return 0x86; /* ���e�I�X�g?�� */
- case WZ_VERMILION: return 0x86; /* ��?�h�I�u���@?�~���I�� */
- //case WZ_FROSTNOVA: return 0x86; /* �t���X�g�m���@ */
- case WZ_STORMGUST: return 0x86; /* �X�g?���K�X�g(�Ƃ肠����LoV�Ɠ�����?��) */
- case CR_GRANDCROSS: return 0x86; /* �O�����h�N���X */
- case NPC_DARKGRANDCROSS: return 0x86; /*�ŃO�����h�N���X*/
- case WZ_FIREPILLAR: return (flag==0)?0x87:0x88; /* �t�@�C�A?�s��? */
- case HT_TALKIEBOX: return 0x99; /* �g?�L?�{�b�N�X */
- case WZ_ICEWALL: return 0x8d; /* �A�C�X�E�H?�� */
- case WZ_QUAGMIRE: return 0x8e; /* �N�@�O�}�C�A */
- case HT_BLASTMINE: return 0x8f; /* �u���X�g�}�C�� */
- case HT_SKIDTRAP: return 0x90; /* �X�L�b�h�g���b�v */
- case HT_ANKLESNARE: return 0x91; /* �A���N���X�l�A */
- case AS_VENOMDUST: return 0x92; /* �x�m���_�X�g */
- case HT_LANDMINE: return 0x93; /* �����h�}�C�� */
- case HT_SHOCKWAVE: return 0x94; /* �V���b�N�E�F?�u�g���b�v */
- case HT_SANDMAN: return 0x95; /* �T���h�}�� */
- case HT_FLASHER: return 0x96; /* �t���b�V��? */
- case HT_FREEZINGTRAP: return 0x97; /* �t��?�W���O�g���b�v */
- case HT_CLAYMORETRAP: return 0x98; /* �N���C���A?�g���b�v */
- case SA_VOLCANO: return 0x9a; /* �{���P?�m */
- case SA_DELUGE: return 0x9b; /* �f����?�W */
- case SA_VIOLENTGALE: return 0x9c; /* �o�C�I�����g�Q�C�� */
- case SA_LANDPROTECTOR: return 0x9d; /* �����h�v���e�N�^? */
- case BD_LULLABY: return 0x9e; /* �q��� */
- case BD_RICHMANKIM: return 0x9f; /* �j�����h�̉� */
- case BD_ETERNALCHAOS: return 0xa0; /* �i���̍��� */
- case BD_DRUMBATTLEFIELD:return 0xa1; /* ?���ۂ̋��� */
- case BD_RINGNIBELUNGEN: return 0xa2; /* �j?�x�����O�̎w�� */
- case BD_ROKISWEIL: return 0xa3; /* ���L�̋��� */
- case BD_INTOABYSS: return 0xa4; /* �[���̒��� */
- case BD_SIEGFRIED: return 0xa5; /* �s���g�̃W?�N�t��?�h */
- case BA_DISSONANCE: return 0xa6; /* �s���a�� */
- case BA_WHISTLE: return 0xa7; /* ���J */
- case BA_ASSASSINCROSS: return 0xa8; /* �[�z�̃A�T�V���N���X */
- case BA_POEMBRAGI: return 0xa9; /* �u���M�̎� */
- case BA_APPLEIDUN: return 0xaa; /* �C�h�D���̗ь� */
- case DC_UGLYDANCE: return 0xab; /* ��������ȃ_���X */
- case DC_HUMMING: return 0xac; /* �n�~���O */
- case DC_DONTFORGETME: return 0xad; /* ����Y��Ȃ��Łc */
- case DC_FORTUNEKISS: return 0xae; /* �K�^�̃L�X */
- case DC_SERVICEFORYOU: return 0xaf; /* �T?�r�X�t�H?��? */
- case RG_GRAFFITI: return 0xb0; /* �O���t�B�e�B */
- case AM_DEMONSTRATION: return 0xb1; /* �f�����X�g��?�V���� */
- case WE_CALLPARTNER: return 0xb2; /* ���Ȃ��Ɉ������� */
- case PA_GOSPEL: return 0xb3; /* �S�X�y�� */
- case HP_BASILICA: return 0xb4; /* �o�W���J */
-// case CG_MOONLIT: return 0xb5;
- case PF_FOGWALL: return 0xb6; /* �t�H�O�E�H?�� */
- case PF_SPIDERWEB: return 0xb7; /* �X�p�C�_?�E�F�b�u */
- // temporary unit ID's [Celest]
- case GD_LEADERSHIP: return 0xc1;
- case GD_GLORYWOUNDS: return 0xc2;
- case GD_SOULCOLD: return 0xc3;
- case GD_HAWKEYES: return 0xc4;
- }
- return 0;
- /*
- 0x89,0x8a,0x8b �\������
- 0x9a ��?���̉r���݂����ȃG�t�F�N�g
- 0x9b ��?���̉r���݂����ȃG�t�F�N�g
- 0x9c ��?���̉r���݂����ȃG�t�F�N�g
- 0x9d ���������ȃG�t�F�N�g
- 0xb1 Alchemist Demonstration
- 0xb2 = Pink Warp Portal
- 0xb3 = Gospel For Paladin
- 0xb4 = Basilica
- 0xb5 = Empty
- 0xb6 = Fog Wall for Professor
- 0xb7 = Spider Web for Professor
- 0xb8 = Empty
- 0xb9 =
- */
+ if (pos!=-1)
+ return &skill_unit_layout[pos];
+
+ if (src->x==x && src->y==y)
+ dir = 2;
+ else
+ dir = map_calc_dir(src,x,y);
+
+ if (skillid==MG_FIREWALL)
+ return &skill_unit_layout[firewall_unit_pos+dir];
+ else if (skillid==WZ_ICEWALL)
+ return &skill_unit_layout[icewall_unit_pos+dir];
+
+ printf("unknown unit layout for skill %d, %d\n",skillid,skilllv);
+ return &skill_unit_layout[0];
}
+// case GD_LEADERSHIP: return 0xc1;
+// case GD_GLORYWOUNDS: return 0xc2;
+// case GD_SOULCOLD: return 0xc3;
+// case GD_HAWKEYES: return 0xc4;
+// 0x89,0x8a,0x8b �\������
+// 0x9a ��?���̉r���݂����ȃG�t�F�N�g
+// 0x9b ��?���̉r���݂����ȃG�t�F�N�g
+// 0x9c ��?���̉r���݂����ȃG�t�F�N�g
+// 0x9d ���������ȃG�t�F�N�g
+// 0xb1 Alchemist Demonstration
+// 0xb2 = Pink Warp Portal
+// 0xb3 = Gospel For Paladin
+// 0xb4 = Basilica
+// 0xb5 = Empty
+// 0xb6 = Fog Wall for Professor
+// 0xb7 = Spider Web for Professor
+// 0xb8 = Empty
+// 0xb9 =
+
/*==========================================
* �X�L���lj�?��
*------------------------------------------
@@ -1162,16 +1128,16 @@ int skill_blown( struct block_list *src, struct block_list *target,int count)
nullpo_retr(0, target);
if(target->type==BL_PC){
- nullpo_retr(0, sd=(struct map_session_data *)target);
+ sd=(struct map_session_data *)target;
}else if(target->type==BL_MOB){
- nullpo_retr(0, md=(struct mob_data *)target);
+ md=(struct mob_data *)target;
}else if(target->type==BL_PET){
- nullpo_retr(0, pd=(struct pet_data *)target);
+ pd=(struct pet_data *)target;
}else if(target->type==BL_SKILL){
- nullpo_retr(0, su=(struct skill_unit *)target);
+ su=(struct skill_unit *)target;
}else return 0;
- if(!(count&0x10000 && (sd||md||pd||su))){ /* �w��Ȃ��Ȃ�ʒu?�W������������߂� */
+ if(!(count&0x10000)){ /* �w��Ȃ��Ȃ�ʒu�֌W������������߂� */
dx=target->x-src->x; dx=(dx>0)?1:((dx<0)?-1: 0);
dy=target->y-src->y; dy=(dy>0)?1:((dy<0)?-1: 0);
}
@@ -1228,18 +1194,13 @@ int skill_blown( struct block_list *src, struct block_list *target,int count)
if(su){
skill_unit_move_unit_group(su->group,target->m,dx,dy);
}else{
-// struct status_change *sc_data=status_get_sc_data(target);
- if(moveblock) map_delblock(target);
- target->x=nx;
- target->y=ny;
- if(moveblock) map_addblock(target);
-/*�_���X���ɃG�t�F�N�g�͈ړ����Ȃ��炵��
- if(sc_data && sc_data[SC_DANCING].timer!=-1){ //?�ۂ��_���X���Ȃ̂ŃG�t�F�N�g���ړ�
- struct skill_unit_group *sg=(struct skill_unit_group *)sc_data[SC_DANCING].val2;
- if(sg)
- skill_unit_move_unit_group(sg,target->m,dx,dy);
- }
-*/
+ int tick = gettick();
+ skill_unit_move(target,tick,0);
+ if(moveblock) map_delblock(target);
+ target->x=nx;
+ target->y=ny;
+ if(moveblock) map_addblock(target);
+ skill_unit_move(target,tick,1);
}
if(sd) { /* ?��?�ɓ����Ă����̂ŕ\�� */
@@ -1258,8 +1219,6 @@ int skill_blown( struct block_list *src, struct block_list *target,int count)
pd->state.state = prev_state;
}
- skill_unit_move(target,gettick(),(count&0xffff)+7); /* �X�L�����j�b�g�̔��� */
-
return 0;
}
@@ -1480,9 +1439,6 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
//����X�L���H�����܂�
switch(skillid){
- case WZ_SIGHTRASHER:
- clif_skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion, damage, dmg.div_, skillid, (lv!=0)?lv:skilllv, 5);
- break;
case AS_SPLASHER:
clif_skill_damage(dsrc,bl,tick,dmg.amotion,dmg.dmotion, damage, dmg.div_, skillid, -1, 5);
break;
@@ -1495,11 +1451,9 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
default:
clif_skill_damage(dsrc,bl,tick,dmg.amotion,dmg.dmotion, damage, dmg.div_, skillid, (lv!=0)?lv:skilllv, (skillid==0)? 5:type );
}
- if(dmg.blewcount > 0 && !map[src->m].flag.gvg) { /* ������΂�?���Ƃ��̃p�P�b�g */
- if(skillid == WZ_SIGHTRASHER)
- skill_blown(src,bl,dmg.blewcount);
- else
- skill_blown(dsrc,bl,dmg.blewcount);
+ /* ������΂������Ƃ��̃p�P�b�g */
+ if (dmg.blewcount > 0 && bl->type!=BL_SKILL && !map[src->m].flag.gvg) {
+ skill_blown(dsrc,bl,dmg.blewcount);
if(bl->type == BL_MOB)
clif_fixmobpos((struct mob_data *)bl);
else if(bl->type == BL_PET)
@@ -1510,8 +1464,12 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
map_freeblock_lock();
/* ?�ۂɃ_��?�W?�����s�� */
- if(skillid || flag)
- battle_damage(src,bl,damage,0);
+ if (skillid || flag) {
+ if (attack_type&BF_WEAPON)
+ battle_delay_damage(tick+dmg.amotion,src,bl,damage,0);
+ else
+ battle_damage(src,bl,damage,0);
+ }
if(skillid == RG_INTIMIDATE && damage > 0 && !(status_get_mode(bl)&0x20) && !map[src->m].flag.gvg ) {
int s_lv = status_get_lv(src),t_lv = status_get_lv(bl);
int rate = 50 + skilllv * 5;
@@ -1594,8 +1552,12 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
battle_heal(NULL,bl,0,-sp,0);
}
- if((skillid || flag) && rdamage > 0)
- battle_damage(bl,src,rdamage,0);
+ if ((skillid || flag) && rdamage>0) {
+ if (attack_type&BF_WEAPON)
+ battle_delay_damage(tick+dmg.amotion,bl,src,rdamage,0);
+ else
+ battle_damage(bl,src,rdamage,0);
+ }
if(attack_type&BF_WEAPON && sc_data && sc_data[SC_AUTOCOUNTER].timer != -1 && sc_data[SC_AUTOCOUNTER].val4 > 0) {
if(sc_data[SC_AUTOCOUNTER].val3 == dsrc->id)
@@ -1647,9 +1609,8 @@ int skill_area_sub( struct block_list *bl,va_list ap )
static int skill_check_unit_range_sub( struct block_list *bl,va_list ap )
{
struct skill_unit *unit;
- int *c,x,y,range,sx[4],sy[4];
- int t_range,tx[4],ty[4];
- int i,r_flag,skillid;
+ int *c;
+ int skillid,unit_id;
nullpo_retr(0, bl);
nullpo_retr(0, ap);
@@ -1662,57 +1623,46 @@ static int skill_check_unit_range_sub( struct block_list *bl,va_list ap )
if(!unit->alive)
return 0;
- x = va_arg(ap,int);
- y = va_arg(ap,int);
- range = va_arg(ap,int);
skillid = va_arg(ap,int);
+ unit_id = unit->group->unit_id;
- if(skillid == MG_SAFETYWALL || skillid == AL_PNEUMA) {
- if(unit->group->unit_id != 0x7e && unit->group->unit_id != 0x85)
+ if (skillid==MG_SAFETYWALL || skillid==AL_PNEUMA) {
+ if(unit_id != 0x7e && unit_id != 0x85)
return 0;
- }
- else if(skillid == AL_WARP) {
- if((unit->group->unit_id < 0x8f || unit->group->unit_id > 0x99) && unit->group->unit_id != 0x92)
+ } else if (skillid==AL_WARP) {
+ if ((unit_id<0x8f || unit_id>0x99) && unit_id!=0x92)
return 0;
- }
- else if((skillid >= HT_SKIDTRAP && skillid <= HT_CLAYMORETRAP) || skillid == HT_TALKIEBOX) {
- if((unit->group->unit_id < 0x8f || unit->group->unit_id > 0x99) && unit->group->unit_id != 0x92)
+ } else if ((skillid>=HT_SKIDTRAP && skillid<=HT_CLAYMORETRAP) || skillid==HT_TALKIEBOX) {
+ if ((unit_id<0x8f || unit_id>0x99) && unit_id!=0x92)
return 0;
- }
- else if(skillid == WZ_FIREPILLAR) {
- if(unit->group->unit_id != 0x87)
+ } else if (skillid==WZ_FIREPILLAR) {
+ if (unit_id!=0x87)
return 0;
- }
- else return 0;
- t_range=(unit->range!=0)? unit->range:unit->group->range;
- tx[0] = tx[3] = unit->bl.x - t_range;
- tx[1] = tx[2] = unit->bl.x + t_range;
- ty[0] = ty[1] = unit->bl.y - t_range;
- ty[2] = ty[3] = unit->bl.y + t_range;
- sx[0] = sx[3] = x - range;
- sx[1] = sx[2] = x + range;
- sy[0] = sy[1] = y - range;
- sy[2] = sy[3] = y + range;
- for(i=r_flag=0;i<4;i++) {
- if(sx[i] >= tx[0] && sx[i] <= tx[1] && sy[i] >= ty[0] && sy[i] <= ty[2]) {
- r_flag = 1;
- break;
- }
- if(tx[i] >= sx[0] && tx[i] <= sx[1] && ty[i] >= sy[0] && ty[i] <= sy[2]) {
- r_flag = 1;
- break;
- }
- }
- if(r_flag) (*c)++;
+ } else if (skillid==HP_BASILICA) {
+ if ((unit_id<0x8f || unit_id>0x99) && unit_id!=0x92 && unit_id!=0x83)
+ return 0;
+ } else
+ return 0;
+
+ (*c)++;
return 0;
}
-int skill_check_unit_range(int m,int x,int y,int range,int skillid)
+int skill_check_unit_range(int m,int x,int y,int skillid,int skilllv)
{
int c = 0;
+ int range = skill_get_unit_range(skillid);
+ int layout_type = skill_get_unit_layout_type(skillid,skilllv);
+ if (layout_type==-1 || layout_type>MAX_SQUARE_LAYOUT) {
+ printf("skill_check_unit_range: unsupported layout type %d for skill %d\n",layout_type,skillid);
+ return 0;
+ }
- map_foreachinarea(skill_check_unit_range_sub,m,x-10,y-10,x+10,y+10,BL_SKILL,&c,x,y,range,skillid);
+ // �Ƃ肠���������`�̃��j�b�g���C�A�E�g�̂ݑΉ�
+ range += layout_type;
+ map_foreachinarea(skill_check_unit_range_sub,m,
+ x-range,y-range,x+range,y+range,BL_SKILL,&c,skillid);
return c;
}
@@ -1720,6 +1670,8 @@ int skill_check_unit_range(int m,int x,int y,int range,int skillid)
static int skill_check_unit_range2_sub( struct block_list *bl,va_list ap )
{
int *c;
+ int skillid;
+
nullpo_retr(0, bl);
nullpo_retr(0, ap);
@@ -1731,16 +1683,29 @@ static int skill_check_unit_range2_sub( struct block_list *bl,va_list ap )
if(bl->type == BL_PC && pc_isdead((struct map_session_data *)bl))
return 0;
+ skillid = va_arg(ap,int);
+ if (skillid==HP_BASILICA && bl->type==BL_PC)
+ return 0;
+
(*c)++;
return 0;
}
-int skill_check_unit_range2(int m,int x,int y,int range)
+int skill_check_unit_range2(int m,int x,int y,int skillid, int skilllv)
{
int c = 0;
+ int range = skill_get_unit_range(skillid);
+ int layout_type = skill_get_unit_layout_type(skillid,skilllv);
+ if (layout_type==-1 || layout_type>MAX_SQUARE_LAYOUT) {
+ printf("skill_check_unit_range2: unsupported layout type %d for skill %d\n",layout_type,skillid);
+ return 0;
+ }
- map_foreachinarea(skill_check_unit_range2_sub,m,x-range,y-range,x+range,y+range,0,&c);
+ // �Ƃ肠���������`�̃��j�b�g���C�A�E�g�̂ݑΉ�
+ range += layout_type;
+ map_foreachinarea(skill_check_unit_range2_sub,m,
+ x-range,y-range,x+range,y+range,0,&c,skillid);
return c;
}
@@ -1758,6 +1723,27 @@ int skill_area_sub_count(struct block_list *src,struct block_list *target,int sk
return 0;
}
+int skill_count_water(struct block_list *src,int range)
+{
+ int i,x,y,cnt = 0,size = range*2+1;
+ struct skill_unit *unit;
+
+ for (i=0;i<size*size;i++) {
+ x = src->x+(i%size-range);
+ y = src->y+(i/size-range);
+ if (map_getcell(src->m,x,y,CELL_CHKWATER)) {
+ cnt++;
+ continue;
+ }
+ unit = map_find_skill_unit_oncell(src,x,y,SA_DELUGE,NULL);
+ if (unit) {
+ cnt++;
+ skill_delunit(unit);
+ }
+ }
+ return cnt;
+}
+
/*==========================================
*
*------------------------------------------
@@ -1877,6 +1863,14 @@ static int skill_timerskill(int tid, unsigned int tick, int id,int data )
src->x+range,src->y+range,0,src,skl->skill_id,skl->skill_lv,tick);
break;
+ case WZ_WATERBALL:
+ if (skl->type>1) {
+ skl->timer = 0; // skill_addtimerskill�Ŏg�p����Ȃ��悤��
+ skill_addtimerskill(src,tick+150,target->id,0,0,skl->skill_id,skl->skill_lv,skl->type-1,skl->flag);
+ skl->timer = -1;
+ }
+ skill_attack(BF_MAGIC,src,src,target,skl->skill_id,skl->skill_lv,tick,skl->flag);
+ break;
default:
skill_attack(skl->type,src,src,target,skl->skill_id,skl->skill_lv,tick,skl->flag);
break;
@@ -2047,7 +2041,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
if(sd && pc_isdead(sd))
return 1;
- if((skillid == WZ_SIGHTRASHER || skillid == CR_GRANDCROSS || skillid == NPC_DARKGRANDCROSS) && src != bl)
+ if((skillid == CR_GRANDCROSS || skillid == NPC_DARKGRANDCROSS) && src != bl)
bl = src;
if(bl->prev == NULL)
return 1;
@@ -2445,8 +2439,17 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
case WZ_WATERBALL: /* �E�H?�^?�{?�� */
skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
- if(skilllv>1)
- status_change_start(src,SC_WATERBALL,skilllv,bl->id,0,0,0,0);
+ if (skilllv>1) {
+ int cnt,range;
+ range = skilllv>5?2:skilllv/2;
+ if (sd)
+ cnt = skill_count_water(src,range)-1;
+ else
+ cnt = skill_get_num(skillid,skilllv)-1;
+ if (cnt>0)
+ skill_addtimerskill(src,tick+150,bl->id,0,0,
+ skillid,skilllv,cnt,flag);
+ }
break;
case PR_BENEDICTIO: /* ��?�~�� */
@@ -2457,6 +2460,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
/* ���@�n��?�U?�X�L�� */
case MG_NAPALMBEAT: /* �i�p?���r?�g */
case MG_FIREBALL: /* �t�@�C��?�{?�� */
+ case WZ_SIGHTRASHER: /* �T�C�g���b�V���[ */
if(flag&1){
/* �•ʂɃ_��?�W��?���� */
if(bl->id!=skill_area_temp[1]){
@@ -2469,27 +2473,46 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
skill_area_temp[0]| 0x0500);
}
}else{
- int ar=(skillid==MG_NAPALMBEAT)?1:2;
+ int ar;
+ skill_area_temp[0]=0;
skill_area_temp[1]=bl->id;
- if(skillid==MG_NAPALMBEAT){ /* �i�p?���ł͐��?���� */
- skill_area_temp[0]=0;
- map_foreachinarea(skill_area_sub,
- bl->m,bl->x-1,bl->y-1,bl->x+1,bl->y+1,0,
- src,skillid,skilllv,tick, flag|BCT_ENEMY ,
- skill_area_sub_count);
- }else{
- skill_area_temp[0]=0;
- skill_area_temp[2]=bl->x;
- skill_area_temp[3]=bl->y;
+ switch (skillid) {
+ case MG_NAPALMBEAT:
+ ar = 1;
+ /* �i�p�[���r�[�g�͕��U�_���[�W�Ȃ̂œG�̐��𐔂��� */
+ map_foreachinarea(skill_area_sub,
+ bl->m,bl->x-ar,bl->y-ar,bl->x+ar,bl->y+ar,0,
+ src,skillid,skilllv,tick,flag|BCT_ENEMY,
+ skill_area_sub_count);
+ break;
+ case MG_FIREBALL:
+ ar = 2;
+ skill_area_temp[2]=bl->x;
+ skill_area_temp[3]=bl->y;
+ /* �^�[�Q�b�g�ɍU����������(�X�L���G�t�F�N�g�\��) */
+ skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,
+ skill_area_temp[0]);
+ break;
+ case WZ_SIGHTRASHER:
+ default:
+ ar = 3;
+ bl = src;
+ status_change_end(src,SC_SIGHT,-1);
+ break;
}
- /* �܂��^?�Q�b�g�ɍU?�������� */
- skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,
- skill_area_temp[0] );
- /* ���̌�^?�Q�b�g�ȊO�̔�??�̓G�S?��?�����s�� */
+ if (skillid==WZ_SIGHTRASHER) {
+ /* �X�L���G�t�F�N�g�\�� */
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ } else {
+ /* �^�[�Q�b�g�ɍU����������(�X�L���G�t�F�N�g�\��) */
+ skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,
+ skill_area_temp[0]);
+ }
+ /* �^�[�Q�b�g�ȊO�͈͓̔��̓G�S�̂ɏ������s�� */
map_foreachinarea(skill_area_sub,
- bl->m,bl->x-ar,bl->y-ar,bl->x+ar,bl->y+ar,0,
- src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
- skill_castend_damage_id);
+ bl->m,bl->x-ar,bl->y-ar,bl->x+ar,bl->y+ar,0,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
}
break;
@@ -2528,12 +2551,6 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
map_foreachinarea(skill_attack_area,src->m,src->x-5,bl->y-5,bl->x+5,bl->y+5,0,BF_MAGIC,src,src,skillid,skilllv,tick,flag,BCT_ENEMY);
break;
- case WZ_SIGHTRASHER:
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_castend_pos2(src,bl->x,bl->y,skillid,skilllv,tick,0);
- status_change_end(src,SC_SIGHT,-1);
- break;
-
/* ���̑� */
case HT_BLITZBEAT: /* �u���b�c�r?�g */
if(flag&1){
@@ -4688,7 +4705,6 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
nullpo_retr(0, sd=(struct map_session_data *)src);
}
if( skillid != WZ_METEOR &&
- skillid != WZ_SIGHTRASHER &&
skillid != AM_CANNIBALIZE &&
skillid != AM_SPHEREMINE)
clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
@@ -4739,7 +4755,6 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
case AL_PNEUMA: /* �j��?�} */
case WZ_ICEWALL: /* �A�C�X�E�H?�� */
case WZ_FIREPILLAR: /* �t�@�C�A�s��? */
- case WZ_SIGHTRASHER:
case WZ_QUAGMIRE: /* �N�@�O�}�C�A */
case WZ_VERMILION: /* ��?�h�I�u���@?�~���I�� */
//case WZ_FROSTNOVA: /* �t���X�g�m���@ */
@@ -5007,349 +5022,137 @@ int skill_castend_map( struct map_session_data *sd,int skill_num, const char *ma
struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,int skilllv,int x,int y,int flag)
{
struct skill_unit_group *group;
- int i,count=1,limit=10000,val1=0,val2=0;
- int target=BCT_ENEMY,interval=1000,range=0;
- int dir=0,aoe_diameter=0; // -- aoe_diameter (moonsoul) added for sage Area Of Effect skills
+ int i,limit,val1=0,val2=0,val3=0;
+ int count=0;
+ int target,interval,range,unit_flag;
+ struct skill_unit_layout *layout;
struct status_change *sc_data;
nullpo_retr(0, src);
+ limit = skill_get_time(skillid,skilllv);
+ range = skill_get_unit_range(skillid);
+ interval = skill_get_unit_interval(skillid);
+ target = skill_get_unit_target(skillid);
+ unit_flag = skill_get_unit_flag(skillid);
+ layout = skill_get_unit_layout(skillid,skilllv,src,x,y);
+
+ if (unit_flag&UF_DEFNOTENEMY && battle_config.defnotenemy)
+ target = BCT_NOENEMY;
+
sc_data = status_get_sc_data(src); // for firewall and fogwall - celest
switch(skillid){ /* �ݒ� */
case MG_SAFETYWALL: /* �Z�C�t�e�B�E�H?�� */
- limit=skill_get_time(skillid,skilllv);
val2=skilllv+1;
- interval = -1;
- target=(battle_config.defnotenemy)?BCT_NOENEMY:BCT_ALL;
break;
-
case MG_FIREWALL: /* �t�@�C��?�E�H?�� */
- if(src->x == x && src->y == y)
- dir = 2;
- else
- dir=map_calc_dir(src,x,y);
- if(dir&1) count=5;
- else count=3;
- limit=skill_get_time(skillid,skilllv);
- if(sc_data) {
- if (sc_data[SC_VIOLENTGALE].timer!=-1) limit = limit*3/2;
- }
- // check for sc_data first - Celest
- // if (((struct map_session_data *)src)->sc_data[SC_VIOLENTGALE].timer!=-1)
- // limit *= 1.5;
+ if(sc_data && sc_data[SC_VIOLENTGALE].timer!=-1)
+ limit = limit*3/2;
val2=4+skilllv;
- interval=1;
- break;
-
- case AL_PNEUMA: /* �j��?�} */
- limit=skill_get_time(skillid,skilllv);
- interval = -1;
- target=(battle_config.defnotenemy)?BCT_NOENEMY:BCT_ALL;
- count = 9;
break;
case AL_WARP: /* ��?�v�|?�^�� */
- target=BCT_ALL;
val1=skilllv+6;
if(flag==0)
limit=2000;
- else
- limit=skill_get_time(skillid,skilllv);
break;
case PR_SANCTUARY: /* �T���N�`���A�� */
- count=21;
- limit=skill_get_time(skillid,skilllv);
val1=(skilllv+3)*2;
val2=(skilllv>6)?777:skilllv*100;
- target=BCT_ALL;
- range=1;
- break;
-
- case PR_MAGNUS: /* �}�O�k�X�G�N�\�V�Y�� */
- count=33;
- limit=skill_get_time(skillid,skilllv);
- interval=3000;
+ interval += 500;
break;
case WZ_FIREPILLAR: /* �t�@�C�A?�s��? */
- if(flag==0)
- limit=skill_get_time(skillid,skilllv);
- else
+ if(flag!=0)
limit=1000;
- interval=2000;
val1=skilllv+2;
- if(skilllv < 6)
- range=1;
- else
+ if(skilllv >= 6)
range=2;
break;
- case MG_THUNDERSTORM: /* �T���_?�X�g?�� */
- limit=500;
- range=1;
- break;
-
- //case WZ_FROSTNOVA: /* �t���X�g�m���@ */
- // limit=500;
- // range=5;
- // break;
-
- case WZ_HEAVENDRIVE: /* �w�����Y�h���C�u */
- limit=500;
- range=2;
- break;
-
- case WZ_METEOR: /* ���e�I�X�g?�� */
- limit=500;
- range=3;
- break;
-
- case WZ_SIGHTRASHER:
- limit=500;
- count=41;
- break;
-
- case WZ_VERMILION: /* ��?�h�I�u���@?�~���I�� */
- limit=4100;
- interval=1000;
- range=6;
- break;
-
- case WZ_ICEWALL: /* �A�C�X�E�H?�� */
- limit=skill_get_time(skillid,skilllv);
- count=5;
- break;
-
- case WZ_STORMGUST: /* �X�g?���K�X�g */
- limit=4600;
- interval=450;
- range=5;
- break;
-
- case WZ_QUAGMIRE: /* �N�@�O�}�C�A */
- limit=skill_get_time(skillid,skilllv);
- interval=200;
- count=25;
- break;
-
case HT_SANDMAN: /* �T���h�}�� */
case HT_CLAYMORETRAP: /* �N���C���A?�g���b�v */
- limit=skill_get_time(skillid,skilllv);
- // longer trap times in WOE [celest]
- if (map[src->m].flag.gvg) limit *= 4;
- range=2;
- break;
case HT_SKIDTRAP: /* �X�L�b�h�g���b�v */
case HT_LANDMINE: /* �����h�}�C�� */
case HT_ANKLESNARE: /* �A���N���X�l�A */
- case PF_SPIDERWEB: /* �X�p�C�_?�E�F�b�u */
case HT_FLASHER: /* �t���b�V��? */
case HT_FREEZINGTRAP: /* �t��?�W���O�g���b�v */
case HT_BLASTMINE: /* �u���X�g�}�C�� */
- limit=skill_get_time(skillid,skilllv);
// longer trap times in WOE [celest]
- if (skillid != PF_SPIDERWEB && map[src->m].flag.gvg)
- limit *= 4;
- range=1;
- break;
-
- case HT_TALKIEBOX: /* �g?�L?�{�b�N�X */
- limit=skill_get_time(skillid,skilllv);
- range=1;
- target=BCT_ALL;
+ if (map[src->m].flag.gvg) limit *= 4;
break;
-
case HT_SHOCKWAVE: /* �V���b�N�E�F?�u�g���b�v */
- limit=skill_get_time(skillid,skilllv);
- range=1;
val1=skilllv*15+10;
break;
- case AS_VENOMDUST: /* �x�m���_�X�g */
- limit=skill_get_time(skillid,skilllv);
- interval=1000;
- count=5;
- break;
-
- case CR_GRANDCROSS: /* �O�����h�N���X */
- case NPC_DARKGRANDCROSS: /*�ŃO�����h�N���X*/
- count=29;
- limit=1000;
- interval=300;
- break;
-
- case SA_VOLCANO: /* �{���P?�m */
- case SA_DELUGE: /* �f����?�W */
- case SA_VIOLENTGALE: /* �o�C�I�����g�Q�C�� */
- limit=skill_get_time(skillid,skilllv);
- //count=skilllv<=2?25:(skilllv<=4?49:81);
- count=49;
- target=BCT_ALL;
- break;
-
case SA_LANDPROTECTOR: /* �O�����h�N���X */
- limit=skill_get_time(skillid,skilllv); // changed to get duration from cast_db (moonsoul)
- val1=skilllv*15+10;
- aoe_diameter=skilllv+skilllv%2+5;
- target=BCT_ALL;
- count=aoe_diameter*aoe_diameter; // -- this will not function if changed to ^2 (moonsoul)
- break;
-
- case BD_LULLABY: /* �q��S */
- case BD_ETERNALCHAOS: /* �G�^?�i���J�I�X */
- case BD_ROKISWEIL: /* ���L�̋��� */
- count=81;
- limit=skill_get_time(skillid,skilllv);
- range=5;
- target=(skillid==BD_ETERNALCHAOS ? BCT_ENEMY : BCT_ALL);
- break;
- case BD_RICHMANKIM:
- case BD_DRUMBATTLEFIELD: /* ?���ۂ̋��� */
- case BD_RINGNIBELUNGEN: /* �j?�x�����O�̎w�� */
- case BD_INTOABYSS: /* �[���̒��� */
- case BD_SIEGFRIED: /* �s���g�̃W?�N�t��?�h */
- count=81;
- limit=skill_get_time(skillid,skilllv);
- range=5;
- target=BCT_PARTY;
+ {
+ int aoe_diameter; // -- aoe_diameter (moonsoul) added for sage Area Of Effect skills
+ val1=skilllv*15+10;
+ aoe_diameter=skilllv+skilllv%2+5;
+ count=aoe_diameter*aoe_diameter; // -- this will not function if changed to ^2 (moonsoul)
+ }
break;
case BA_WHISTLE: /* ���J */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=3;
- target=BCT_NOENEMY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON)+1)>>1;
val2 = ((status_get_agi(src)/10)&0xffff)<<16;
val2 |= (status_get_luk(src)/10)&0xffff;
break;
case DC_HUMMING: /* �n�~���O */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=3;
- target=BCT_NOENEMY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON)+1)>>1;
val2 = status_get_dex(src)/10;
break;
-
- case BA_DISSONANCE: /* �s���a�� */
- case DC_UGLYDANCE: /* ��������ȃ_���X */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=3;
- target=BCT_ENEMY;
- break;
-
case DC_DONTFORGETME: /* ����Y��Ȃ��Łc */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=3;
- target=BCT_ENEMY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON)+1)>>1;
val2 = ((status_get_str(src)/20)&0xffff)<<16;
val2 |= (status_get_agi(src)/10)&0xffff;
break;
case BA_POEMBRAGI: /* �u���M�̎� */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=3;
- target=BCT_NOENEMY;
if(src->type == BL_PC)
val1 = pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON);
val2 = ((status_get_dex(src)/10)&0xffff)<<16;
val2 |= (status_get_int(src)/5)&0xffff;
break;
case BA_APPLEIDUN: /* �C�h�D���̗ь� */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=3;
- target=BCT_NOENEMY;
if(src->type == BL_PC)
val1 = ((pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON))&0xffff)<<16;
- else
- val1 = 0;
- val1 |= (status_get_vit(src))&0xffff;
- val2 = 0;//�񕜗p�^�C���J�E���^(6�b?��1?��)
+ val2 |= (status_get_vit(src))&0xffff;
+ val3 = 0;//�񕜗p�^�C���J�E���^(6�b?��1?��)
break;
case DC_SERVICEFORYOU: /* �T?�r�X�t�H?��? */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=3;
- target=BCT_PARTY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON)+1)>>1;
val2 = status_get_int(src)/10;
break;
case BA_ASSASSINCROSS: /* �[�z�̃A�T�V���N���X */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=3;
- target=BCT_NOENEMY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON)+1)>>1;
val2 = status_get_agi(src)/20;
break;
case DC_FORTUNEKISS: /* �K�^�̃L�X */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=3;
- target=BCT_NOENEMY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON)+1)>>1;
val2 = status_get_luk(src)/10;
break;
- case AM_DEMONSTRATION: /* �f�����X�g��?�V���� */
- limit=skill_get_time(skillid,skilllv);
- interval=1000;
- range=1;
- target=BCT_ENEMY;
- break;
-
- case WE_CALLPARTNER: /* ���Ȃ��Ɉ������� */
- limit=skill_get_time(skillid,skilllv);
- range=-1;
- break;
-
case HP_BASILICA: /* �o�W���J */
- limit=skill_get_time(skillid,skilllv);
- target=BCT_ALL;
- range=3;
//Fix to prevent the priest from walking while Basilica is up.
battle_stopwalking(src,1);
- //status_change_start(src,SC_ANKLE,skilllv,0,0,0,limit,0);
- //sd->canmove_tick = gettick() + limit; // added later [celest]
- break;
-
- case PA_GOSPEL: /* �S�X�y�� */
- count=49;
- target=BCT_PARTY;
- limit=skill_get_time(skillid,skilllv);
break;
-/* case CG_MOONLIT:
- range=1;
- target=BCT_ALL;
- limit=skill_get_time(skillid,skilllv);
- break;*/
-
case PF_FOGWALL: /* �t�H�O�E�H?�� */
- count=15;
- limit=skill_get_time(skillid,skilllv);
- if(sc_data) {
- if (sc_data[SC_DELUGE].timer!=-1) limit *= 2;
- }
+ if(sc_data && sc_data[SC_DELUGE].timer!=-1) limit *= 2;
break;
case RG_GRAFFITI: /* Graffiti */
count=1; // Leave this at 1 [Valaris]
- limit=600000; // Time length [Valaris]
break;
case GD_LEADERSHIP:
@@ -5360,20 +5163,16 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
target=BCT_ALL;
limit=300000;
break;
-
- default:
- if(battle_config.error_log)
- printf ("skill_unitsetting: Unknown skill id = %d\n",skillid);
- return 0;
}
- nullpo_retr(NULL, group=skill_initunitgroup(src,count,skillid,skilllv,skill_get_unit_id(skillid,flag&1)));
+ nullpo_retr(NULL, group=skill_initunitgroup(src,(count > 0 ? count : layout->count),
+ skillid,skilllv,skill_get_unit_id(skillid,flag&1)));
group->limit=limit;
group->val1=val1;
group->val2=val2;
+ group->val3=val3;
group->target_flag=target;
group->interval=interval;
- group->range=range;
if(skillid==HT_TALKIEBOX ||
skillid==RG_GRAFFITI){
group->valstr=aCallocA(80, 1);
@@ -5383,200 +5182,20 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
}
memcpy(group->valstr,talkie_mes,80);
}
- for(i=0;i<count;i++){
+ for(i=0;i<layout->count;i++){
struct skill_unit *unit;
- int ux=x,uy=y,val1=skilllv,val2=0,limit=group->limit,alive=1;
- int range=group->range;
- switch(skillid){ /* �ݒ� */
- case AL_PNEUMA: /* �j��?�} */
- {
- static const int dx[9]={-1, 0, 1,-1, 0, 1,-1, 0, 1};
- static const int dy[9]={-1,-1,-1, 0, 0, 0, 1, 1, 1};
- ux+=dx[i];
- uy+=dy[i];
- }
- break;
+ int ux,uy,val1=skilllv,val2=0,limit=group->limit,alive=1;
+ ux = x + layout->dx[i];
+ uy = y + layout->dy[i];
+ switch (skillid) {
case MG_FIREWALL: /* �t�@�C��?�E�H?�� */
- {
- if(dir&1){ /* �΂ߔz�u */
- static const int dx[][5]={
- { 1,1,0,0,-1 }, { -1,-1,0,0,1 },
- },dy[][5]={
- { 1,0,0,-1,-1 }, { 1,0,0,-1,-1 },
- };
- ux+=dx[(dir>>1)&1][i];
- uy+=dy[(dir>>1)&1][i];
- }else{ /* �㉺�z�u */
- if(dir%4==0) /* �㉺ */
- ux+=i-1;
- else /* ���E */
- uy+=i-1;
- }
- val2=group->val2;
- }
- break;
-
- case PR_SANCTUARY: /* �T���N�`���A�� */
- {
- static const int dx[]={
- -1,0,1, -2,-1,0,1,2, -2,-1,0,1,2, -2,-1,0,1,2, -1,0,1 };
- static const int dy[]={
- -2,-2,-2, -1,-1,-1,-1,-1, 0,0,0,0,0, 1,1,1,1,1, 2,2,2, };
- ux+=dx[i];
- uy+=dy[i];
- }
- break;
-
- case PR_MAGNUS: /* �}�O�k�X�G�N�\�V�Y�� */
- {
- static const int dx[]={ -1,0,1, -1,0,1, -3,-2,-1,0,1,2,3,
- -3,-2,-1,0,1,2,3, -3,-2,-1,0,1,2,3, -1,0,1, -1,0,1, };
- static const int dy[]={
- -3,-3,-3, -2,-2,-2, -1,-1,-1,-1,-1,-1,-1,
- 0,0,0,0,0,0,0, 1,1,1,1,1,1,1, 2,2,2, 3,3,3 };
- ux+=dx[i];
- uy+=dy[i];
- }
+ val2=group->val2;
break;
-
- case WZ_SIGHTRASHER:
- {
- static const int dx[]={
- -5, 0, 5, -4, 0, 4, -3, 0, 3, -2, 0, 2, -1, 0, 1, -5,-4,-3,-2,-1, 0, 1, 2, 3, 4, 5, -1, 0, 1, -2, 0, 2, -3, 0, 3, -4, 0, 4, -5, 0, 5 };
- static const int dy[]={
- -5,-5,-5, -4,-4,-4, -3,-3,-3, -2,-2,-2, -1,-1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5 };
- ux+=dx[i];
- uy+=dy[i];
- }
- break;
-
case WZ_ICEWALL: /* �A�C�X�E�H?�� */
- {
- static const int dirx[8]={0,-1,-1,-1,0,1,1,1};
- static const int diry[8]={1,1,0,-1,-1,-1,0,1};
if(skilllv <= 1)
val1 = 500;
else
val1 = 200 + 200*skilllv;
- if(src->x == x && src->y == y)
- dir = 2;
- else
- dir=map_calc_dir(src,x,y);
- ux+=(2-i)*diry[dir];
- uy+=(i-2)*dirx[dir];
- }
- break;
-
- case WZ_QUAGMIRE: /* �N�@�O�}�C�A */
- ux+=(i%5-2);
- uy+=(i/5-2);
- if(i==12)
- range=2;
- else
- range=-1;
-
- break;
-
- case AS_VENOMDUST: /* �x�m���_�X�g */
- {
- static const int dx[]={-1,0,0,0,1};
- static const int dy[]={0,-1,0,1,0};
- ux+=dx[i];
- uy+=dy[i];
- }
- break;
-
- case CR_GRANDCROSS: /* �O�����h�N���X */
- case NPC_DARKGRANDCROSS: /*�ŃO�����h�N���X*/
- {
- static const int dx[]={
- 0, 0, -1,0,1, -2,-1,0,1,2, -4,-3,-2,-1,0,1,2,3,4, -2,-1,0,1,2, -1,0,1, 0, 0, };
- static const int dy[]={
- -4, -3, -2,-2,-2, -1,-1,-1,-1,-1, 0,0,0,0,0,0,0,0,0, 1,1,1,1,1, 2,2,2, 3, 4, };
- ux+=dx[i];
- uy+=dy[i];
- }
- break;
- case SA_VOLCANO: /* �{���P?�m */
- case SA_DELUGE: /* �f����?�W */
- case SA_VIOLENTGALE: /* �o�C�I�����g�Q�C�� */
- {
- int u_range=0,central=0;
- if(skilllv<=2){
- u_range=2;
- central=12;
- }else if(skilllv<=4){
- u_range=3;
- central=24;
- }else if(skilllv>=5){
- u_range=4;
- central=40;
- }
- ux+=(i%(u_range*2+1)-u_range);
- uy+=(i/(u_range*2+1)-u_range);
-
- if(i==central)
- range=u_range;//�����̃��j�b�g��?�ʔ�?�͑S��?
- else
- range=-1;//�����ȊO�̃��j�b�g�͏���
- }
- break;
- case SA_LANDPROTECTOR: /* �����h�v���e�N�^? */
- {
- int u_range=0;
-
- if(skilllv<=2) u_range=3;
- else if(skilllv<=4) u_range=4;
- else if(skilllv>=5) u_range=5;
-
- ux+=(i%(u_range*2+1)-u_range);
- uy+=(i/(u_range*2+1)-u_range);
-
- range=0;
- }
- break;
-
- /* �_���X�Ȃ� */
- case BD_LULLABY: /* �q��� */
- case BD_RICHMANKIM: /* �j�����h�̉� */
- case BD_ETERNALCHAOS: /* �i���̍��� */
- case BD_DRUMBATTLEFIELD:/* ?���ۂ̋��� */
- case BD_RINGNIBELUNGEN: /* �j?�x�����O�̎w�� */
- case BD_ROKISWEIL: /* ���L�̋��� */
- case BD_INTOABYSS: /* �[���̒��� */
- case BD_SIEGFRIED: /* �s���g�̃W?�N�t��?�h */
- ux+=(i%9-4);
- uy+=(i/9-4);
- if(i==40)
- range=4; /* ���S�̏ꍇ�͔�?��4�ɃI?�o?���C�h */
- else
- range=-1; /* ���S����Ȃ��ꍇ�͔�?��-1�ɃI?�o?���C�h */
- break;
- case BA_DISSONANCE: /* �s���a�� */
- case BA_WHISTLE: /* ���J */
- case BA_ASSASSINCROSS: /* �[�z�̃A�T�V���N���X */
- case BA_POEMBRAGI: /* �u���M�̎� */
- case BA_APPLEIDUN: /* �C�h�D���̗ь� */
- case DC_UGLYDANCE: /* ��������ȃ_���X */
- case DC_HUMMING: /* �n�~���O */
- case DC_DONTFORGETME: /* ����Y��Ȃ��Łc */
- case DC_FORTUNEKISS: /* �K�^�̃L�X */
- case DC_SERVICEFORYOU: /* �T?�r�X�t�H?��? */
-// case CG_MOONLIT:
- ux+=(i%7-3);
- uy+=(i/7-3);
- if(i==40)
- range=4; /* ���S�̏ꍇ�͔�?��4�ɃI?�o?���C�h */
- else
- range=-1; /* ���S����Ȃ��ꍇ�͔�?��-1�ɃI?�o?���C�h */
- break;
- case PA_GOSPEL: /* �S�X�y�� */
- ux+=(i%7-3);
- uy+=(i/7-3);
- break;
- case PF_FOGWALL: /* �t�H�O�E�H?�� */
- ux+=(i%5-2);
- uy+=(i/5-1);
break;
case RG_GRAFFITI: /* Graffiti [Valaris] */
ux+=(i%5-2);
@@ -5603,7 +5222,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
unit->val2=val2;
unit->limit=limit;
unit->range=range;
-
+
// [celest]
if (sc_data) {
// attach the unit's id to the caster
@@ -5642,6 +5261,10 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
break;
}
}
+ if (range==0)
+ map_foreachinarea(skill_unit_effect,unit->bl.m
+ ,unit->bl.x,unit->bl.y,unit->bl.x,unit->bl.y
+ ,0,&unit->bl,gettick(),1);
}
}
return group;
@@ -5655,123 +5278,284 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
{
struct skill_unit_group *sg;
struct block_list *ss;
- struct skill_unit_group_tickset *ts;
- struct map_session_data *srcsd=NULL;
- int diff,goflag,splash_count=0;
+ struct skill_unit *unit2;
struct status_change *sc_data;
+ int type;
nullpo_retr(0, src);
nullpo_retr(0, bl);
- sc_data = status_get_sc_data(bl);
-
- if( bl->prev==NULL || !src->alive || (bl->type == BL_PC && pc_isdead((struct map_session_data *)bl) ) )
+
+ if(bl->prev==NULL || !src->alive ||
+ (bl->type == BL_PC && pc_isdead((struct map_session_data *)bl)))
return 0;
nullpo_retr(0, sg=src->group);
nullpo_retr(0, ss=map_id2bl(sg->src_id));
+
+ sc_data = status_get_sc_data(bl);
+ type = SkillStatusChangeTable[sg->skill_id];
- if(ss->type == BL_PC)
- nullpo_retr(0, srcsd=(struct map_session_data *)ss);
- if(srcsd && srcsd->chatID)
+ if (battle_check_target(&src->bl,bl,sg->target_flag)<=0)
return 0;
- if( bl->type != BL_PC && bl->type != BL_MOB )
+ // �Ώۂ�LP��ɋ���ꍇ�͖���
+ if (map_find_skill_unit_oncell(bl,bl->x,bl->y,SA_LANDPROTECTOR,NULL))
return 0;
- nullpo_retr(0, ts = skill_unitgrouptickset_search(bl, sg));
- diff=DIFF_TICK(tick,ts->tick);
- goflag=(diff>sg->interval || diff<0);
- if (sg->skill_id == CR_GRANDCROSS && !battle_config.gx_allhit) // �d�Ȃ��Ă�����3HIT���Ȃ�
- goflag = (diff>sg->interval*map_count_oncell(bl->m,bl->x,bl->y) || diff<0);
- //?�ۂ�LP��ɋ���ꍇ�͖�?
- map_foreachinarea(skill_landprotector,bl->m,bl->x,bl->y,bl->x,bl->y,BL_SKILL,0,&goflag);
+ switch (sg->unit_id) {
+ case 0x85: /* �j���[�} */
+ case 0x7e: /* �Z�C�t�e�B�E�H�[�� */
+ if (sc_data && sc_data[type].timer == -1)
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
+ break;
- if(!goflag)
- return 0;
- ts->tick=tick;
+ case 0x80: /* ���[�v�|�[�^��(������) */
+ if(bl->type==BL_PC){
+ struct map_session_data *sd = (struct map_session_data *)bl;
+ if(sd && src->bl.m == bl->m && src->bl.x == bl->x && src->bl.y == bl->y &&
+ src->bl.x == sd->to_x && src->bl.y == sd->to_y) {
+ if( battle_config.chat_warpportal || !sd->chatID ){
+ pc_setpos(sd,sg->valstr,sg->val2>>16,sg->val2&0xffff,3);
+ if(sg->src_id == bl->id || (strcmp(map[src->bl.m].name,sg->valstr) == 0 &&
+ src->bl.x == (sg->val2>>16) && src->bl.y == (sg->val2&0xffff) ))
+ skill_delunitgroup(sg);
+ if (--sg->val1<=0)
+ skill_delunitgroup(sg);
+ }
+ }
+ } else if(bl->type==BL_MOB && battle_config.mob_warpportal){
+ int m = map_mapname2mapid(sg->valstr);
+ mob_warp((struct mob_data *)bl,m,sg->val2>>16,sg->val2&0xffff,3);
+ }
+ break;
- switch(sg->unit_id){
- case 0x83: /* �T���N�`���A�� */
- {
- int race=status_get_race(bl);
- int damage_flag = (battle_check_undead(race,status_get_elem_type(bl)) || race == 6)? 1:0;
+ case 0x8e: /* �N�@�O�}�C�A */
+ if(bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
+ break;
+ if(sc_data && sc_data[type].timer==-1)
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,
+ skill_get_time2(sg->skill_id,sg->skill_lv),0);
+ break;
- if( status_get_hp(bl)>=status_get_max_hp(bl) && !damage_flag)
+ case 0x9a: /* �{���P?�m */
+ case 0x9b: /* �f����?�W */
+ case 0x9c: /* �o�C�I�����g�Q�C�� */
+ if (sc_data && sc_data[type].timer!=-1) {
+ unit2 = (struct skill_unit *)sc_data[type].val4;
+ if (unit2 && unit2->group &&
+ (unit2==src || DIFF_TICK(sg->tick,unit2->group->tick)<=0))
break;
-
- if((sg->val1--)<=0){
- skill_delunitgroup(sg);
- return 0;
- }
- if(!damage_flag) {
- int heal=sg->val2;
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage)
- heal=0; /* ?��峃J?�h�i�q?���ʂO�j */
- clif_skill_nodamage(&src->bl,bl,AL_HEAL,heal,1);
- battle_heal(NULL,bl,heal,0,0);
- }
- else {
- // reduce healing count if this was meant for damaging [celest]
- sg->val1 /= 2;
- skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
- }
}
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,
+ skill_get_time2(sg->skill_id,sg->skill_lv),0);
break;
- case 0x84: /* �}�O�k�X�G�N�\�V�Y�� */
- {
- int race=status_get_race(bl);
- int damage_flag = (battle_check_undead(race,status_get_elem_type(bl)) || race == 6)? 1:0;
+ case 0x9e: /* �q��S */
+ case 0x9f: /* �j�����h�̉� */
+ case 0xa0: /* �i���̍��� */
+ case 0xa1: /* ?���ۂ̋��� */
+ case 0xa2: /* �j?�x�����O�̎w�� */
+ case 0xa3: /* ���L�̋��� */
+ case 0xa4: /* �[���̒��� */
+ case 0xa5: /* �s���g�̃W?�N�t��?�h */
+ case 0xa6: /* �s���a�� */
+ case 0xa7: /* ���J */
+ case 0xa8: /* �[�z�̃A�T�V���N���X */
+ case 0xa9: /* �u���M�̎� */
+ case 0xaa: /* �C�h�D���̗ь� */
+ case 0xab: /* ��������ȃ_���X */
+ case 0xac: /* �n�~���O */
+ case 0xad: /* ����Y��Ȃ��Łc */
+ case 0xae: /* �K�^�̃L�X */
+ case 0xaf: /* �T?�r�X�t�H?��? */
+ case 0xb4:
+ if (sg->src_id==bl->id)
+ break;
+ if (sc_data && sc_data[type].timer!=-1) {
+ unit2 = (struct skill_unit *)sc_data[type].val4;
+ if (unit2 && unit2->group &&
+ (unit2 == src || DIFF_TICK(sg->tick,unit2->group->tick)<=0))
+ break;
+ }
+ status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
+ (int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
+ break;
- if(!damage_flag)
- return 0;
- skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
+ case 0xb6: /* �t�H�O�E�H?�� */
+ if (sc_data && sc_data[type].timer!=-1) {
+ unit2 = (struct skill_unit *)sc_data[type].val4;
+ if (unit2 && unit2->group &&
+ (unit2 == src || DIFF_TICK(sg->tick,unit2->group->tick)<=0))
+ break;
}
+ status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
+ (int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
+ skill_additional_effect(ss,bl,sg->skill_id,sg->skill_lv,BF_MISC,tick);
break;
- case 0x85: /* �j��?�} */
+ // New guild skills [Celest]
+ case 0xc1: // GD_LEADERSHIP
{
- struct skill_unit *unit2;
- int type=SC_PNEUMA;
- if(sc_data) {
- if (sc_data[type].timer==-1)
- status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
- else if((unit2 = (struct skill_unit *)sc_data[type].val2) && unit2 != src){
- if(unit2 && unit2->group && DIFF_TICK(sg->tick,unit2->group->tick) > 0)
- status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
- ts->tick-=sg->interval;
+ struct map_session_data *sd, *tsd;
+ tsd=(struct map_session_data *)ss;
+ if (tsd && (sd=(struct map_session_data *)bl) &&
+ sd->status.guild_id == tsd->status.guild_id &&
+ sd != tsd) {
+ sd->state.leadership_flag = (int)src;
+ status_calc_pc (sd, 0);
}
- }
}
break;
- case 0x7e: /* �Z�C�t�e�B�E�H?�� */
- if (sc_data) {
- status_change_start(bl,SC_SAFETYWALL,sg->skill_lv,(int)src,0,0,0,0);
- ts->tick-=sg->interval;
+ case 0xc2: // GD_GLORYWOUNDS
+ {
+ struct map_session_data *sd, *tsd;
+ tsd=(struct map_session_data *)ss;
+ if (tsd && (sd=(struct map_session_data *)bl) &&
+ sd->status.guild_id == tsd->status.guild_id &&
+ sd != tsd) {
+ sd->state.glorywounds_flag = (int)src;
+ status_calc_pc (sd, 0);
+ }
+ }
+ break;
+ case 0xc3: // GD_SOULCOLD
+ {
+ struct map_session_data *sd, *tsd;
+ tsd=(struct map_session_data *)ss;
+ if (tsd && (sd=(struct map_session_data *)bl) &&
+ sd->status.guild_id == tsd->status.guild_id &&
+ sd != tsd) {
+ sd->state.soulcold_flag = (int)src;
+ status_calc_pc (sd, 0);
+ }
+ }
+ break;
+ case 0xc4: // GD_HAWKEYES
+ {
+ struct map_session_data *sd, *tsd;
+ tsd=(struct map_session_data *)ss;
+ if (tsd && (sd=(struct map_session_data *)bl) &&
+ sd->status.guild_id == tsd->status.guild_id &&
+ sd != tsd) {
+ sd->state.hawkeyes_flag = (int)src;
+ status_calc_pc (sd, 0);
+ }
}
break;
- case 0x86: /* ��?�h�I�u���@?�~���I��(���X�g?���K�X�g ���O�����h�N���X) */
- skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
+ case 0xb2: /* ���Ȃ���_?�������ł� */
+ case 0xb3: /* �S�X�y�� */
+ //case 0xb6: /* �t�H�O�E�H?�� */ - moved [celest]
+ //�Ƃ肠�����������Ȃ�
break;
+ /* default:
+ if(battle_config.error_log)
+ printf("skill_unit_onplace: Unknown skill unit id=%d block=%d\n",sg->unit_id,bl->id);
+ break;*/
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * �X�L�����j�b�g�̔����C�x���g(�^�C�}�[����)
+ *------------------------------------------
+ */
+int skill_unit_onplace_timer(struct skill_unit *src,struct block_list *bl,unsigned int tick)
+{
+ struct skill_unit_group *sg;
+ struct block_list *ss;
+ int splash_count=0;
+ struct status_change *sc_data;
+ struct skill_unit_group_tickset *ts;
+ int type;
+ int diff=0;
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, bl);
+
+ if (bl->type!=BL_PC && bl->type!=BL_MOB)
+ return 0;
+
+ if (bl->prev==NULL || !src->alive ||
+ (bl->type==BL_PC && pc_isdead((struct map_session_data *)bl)))
+ return 0;
+
+ nullpo_retr(0, sg=src->group);
+ nullpo_retr(0, ss=map_id2bl(sg->src_id));
+ sc_data = status_get_sc_data(bl);
+ type = SkillStatusChangeTable[sg->skill_id];
+
+ // �Ώۂ�LP��ɋ���ꍇ�͖���
+ if (map_find_skill_unit_oncell(bl,bl->x,bl->y,SA_LANDPROTECTOR,NULL))
+ return 0;
+
+ // �O�ɉe�����󂯂Ă���interval�̊Ԃ͉e�����󂯂Ȃ�
+ nullpo_retr(0,ts = skill_unitgrouptickset_search(bl,sg,tick));
+ diff = DIFF_TICK(tick,ts->tick);
+ if (sg->skill_id == PR_SANCTUARY)
+ diff += 500; // �V�K�ɉ񕜂������j�b�g�����J�E���g���邽�߂̎d�|��
+ if (diff < 0)
+ return 0;
+ ts->tick = tick+sg->interval;
+ // GX�͏d�Ȃ��Ă�����3HIT���Ȃ�
+ if (sg->skill_id==CR_GRANDCROSS && !battle_config.gx_allhit)
+ ts->tick += sg->interval*(map_count_oncell(bl->m,bl->x,bl->y)-1);
+
+ switch (sg->unit_id) {
+ case 0x83: /* �T���N�`���A�� */
+ {
+ int race=status_get_race(bl);
- case 0x7f: /* �t�@�C��?�E�H?�� */
- if( (src->val2--)>0)
- skill_attack(BF_MAGIC,ss,&src->bl,bl,
- sg->skill_id,sg->skill_lv,tick,0);
- if( src->val2<=0 )
+ if (battle_check_undead(race,status_get_elem_type(bl)) || race==6) {
+ if (skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0)) {
+ // reduce healing count if this was meant for damaging [celest]
+ // sg->val1 /= 2;
+ sg->val1--; // �`���b�g�L�����Z���ɑΉ�
+ }
+ } else {
+ int heal = sg->val2;
+ if (status_get_hp(bl)>=status_get_max_hp(bl))
+ break;
+ if(bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage)
+ heal=0; /* ����峃J�[�h�i�q�[���ʂO�j */
+ clif_skill_nodamage(&src->bl,bl,AL_HEAL,heal,1);
+ battle_heal(NULL,bl,heal,0,0);
+ if (diff>=500)
+ sg->val1--; // �V�K�ɓ��������j�b�g�����J�E���g
+ }
+ if (sg->val1<=0)
+ skill_delunitgroup(sg);
+ break;
+ }
+
+ case 0x84: /* �}�O�k�X�G�N�\�V�Y�� */
+ {
+ int race = status_get_race(bl);
+ if (!battle_check_undead(race,status_get_elem_type(bl)) && race!=6)
+ return 0;
+ skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
+ src->val2++;
+ break;
+ }
+
+ case 0x7f: /* �t�@�C���[�E�H�[�� */
+ skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
+ if (--src->val2<=0)
skill_delunit(src);
break;
-
- case 0x87: /* �t�@�C�A?�s��?(?���O) */
+ case 0x86: /* ���[�h�I�u���@�[�~���I��(TS,MS,FN,SG,HD,GX,��GX) */
+ skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
+ break;
+ case 0x87: /* �t�@�C�A�[�s���[(�����O) */
skill_delunit(src);
skill_unitsetting(ss,sg->skill_id,sg->skill_lv,src->bl.x,src->bl.y,1);
break;
- case 0x88: /* �t�@�C�A?�s��?(?����) */
- if(DIFF_TICK(tick,sg->tick) < 150)
- //skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
- map_foreachinarea(skill_attack_area,bl->m,bl->x-1,bl->y-1,bl->x+1,bl->y+1,0,BF_MAGIC,ss,&src->bl,sg->skill_id,sg->skill_lv,tick,0,BCT_ENEMY); // area damage [Celest]
+ case 0x88: /* �t�@�C�A�[�s���[(������) */
+ map_foreachinarea(skill_attack_area,bl->m,bl->x-1,bl->y-1,bl->x+1,bl->y+1,0,
+ BF_MAGIC,ss,&src->bl,sg->skill_id,sg->skill_lv,tick,0,BCT_ENEMY); // area damage [Celest]
+ //skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
break;
case 0x90: /* �X�L�b�h�g���b�v */
@@ -5784,7 +5568,7 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
clif_changelook(&src->bl,LOOK_BASE,sg->unit_id);
sg->limit=DIFF_TICK(tick,sg->tick)+1500;
}
- break;
+ break;
case 0x93: /* �����h�}�C�� */
skill_attack(BF_MISC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
@@ -5813,22 +5597,22 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
break;
case 0x91: /* �A���N���X�l�A */
- {
- struct status_change *sc_data=status_get_sc_data(bl);
- if(sg->val2==0 && sc_data && sc_data[SC_ANKLE].timer==-1){
- int moveblock = ( bl->x/BLOCK_SIZE != src->bl.x/BLOCK_SIZE || bl->y/BLOCK_SIZE != src->bl.y/BLOCK_SIZE);
- int sec = skill_get_time2(sg->skill_id,sg->skill_lv) - status_get_agi(bl)*100;
- if(status_get_mode(bl)&0x20)
- sec = sec/5;
- if (sec < 3000) // minimum time of 3 seconds [celest]
- sec = 3000;
- battle_stopwalking(bl,1);
- status_change_start(bl,SC_ANKLE,sg->skill_lv,0,0,0,sec,0);
-
+ if(sg->val2==0 && sc_data && sc_data[SC_ANKLE].timer==-1){
+ int moveblock = ( bl->x/BLOCK_SIZE != src->bl.x/BLOCK_SIZE || bl->y/BLOCK_SIZE != src->bl.y/BLOCK_SIZE);
+ int sec = skill_get_time2(sg->skill_id,sg->skill_lv) - status_get_agi(bl)*100;
+ if(status_get_mode(bl)&0x20)
+ sec = sec/5;
+ if (sec < 3000) // minimum time of 3 seconds [celest]
+ sec = 3000;
+ battle_stopwalking(bl,1);
+ status_change_start(bl,SC_ANKLE,sg->skill_lv,0,0,0,sec,0);
+
+ skill_unit_move(bl,tick,0);
if(moveblock) map_delblock(bl);
bl->x = src->bl.x;
bl->y = src->bl.y;
if(moveblock) map_addblock(bl);
+ skill_unit_move(bl,tick,1);
if(bl->type == BL_MOB)
clif_fixmobpos((struct mob_data *)bl);
else if(bl->type == BL_PET)
@@ -5836,156 +5620,26 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
else
clif_fixpos(bl);
clif_01ac(&src->bl);
- sg->limit=DIFF_TICK(tick,sg->tick) + sec;
+ sg->limit=DIFF_TICK(tick,sg->tick) + sec;
sg->val2=bl->id;
- }
- }
- break;
-
- case 0x80: /* ��?�v�|?�^��(?����) */
- if(bl->type==BL_PC){
- struct map_session_data *sd = (struct map_session_data *)bl;
- if(sd && src->bl.m == bl->m && src->bl.x == bl->x && src->bl.y == bl->y && src->bl.x == sd->to_x && src->bl.y == sd->to_y) {
- if( battle_config.chat_warpportal || !sd->chatID ){
- if((sg->val1--)>0){
- pc_setpos(sd,sg->valstr,sg->val2>>16,sg->val2&0xffff,3);
- if(sg->src_id == bl->id ||( strcmp(map[src->bl.m].name,sg->valstr) == 0 && src->bl.x == (sg->val2>>16) && src->bl.y == (sg->val2&0xffff) ))
- skill_delunitgroup(sg);
- }else
- skill_delunitgroup(sg);
- }
- }
- }else if(bl->type==BL_MOB && battle_config.mob_warpportal){
- int m=map_mapname2mapid(sg->valstr);
- struct mob_data *md;
- md=(struct mob_data *)bl;
- mob_warp((struct mob_data *)bl,m,sg->val2>>16,sg->val2&0xffff,3);
+ sg->interval = -1;
+ src->range = 0;
}
break;
- case 0x8e: /* �N�@�O�}�C�A */
- {
- struct status_change *sc_data=status_get_sc_data(bl);
- int type=SkillStatusChangeTable[sg->skill_id];
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
- break;
- if(sc_data && sc_data[type].timer==-1)
- status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- }
- break;
case 0x92: /* �x�m���_�X�g */
- {
- struct status_change *sc_data=status_get_sc_data(bl);
- int type=SkillStatusChangeTable[sg->skill_id];
- if(sc_data && sc_data[type].timer==-1 )
- status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- }
+ if(sc_data && sc_data[type].timer==-1 )
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
break;
- case 0x9a: /* �{���P?�m */
- case 0x9b: /* �f����?�W */
- case 0x9c: /* �o�C�I�����g�Q�C�� */
- {
- struct skill_unit *unit2;
- struct status_change *sc_data=status_get_sc_data(bl);
- int type=SkillStatusChangeTable[sg->skill_id];
- if(sc_data) {
- if (sc_data[type].timer==-1)
- status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- else if((unit2=(struct skill_unit *)sc_data[type].val2) && unit2 != src ){
- if(unit2 && unit2->group && DIFF_TICK(sg->tick,unit2->group->tick)>0 )
- status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- ts->tick-=sg->interval;
- }
- }
- } break;
-
- case 0x9e: /* �q��S */
- case 0x9f: /* �j�����h�̉� */
- case 0xa0: /* �i���̍��� */
- case 0xa1: /* ?���ۂ̋��� */
- case 0xa2: /* �j?�x�����O�̎w�� */
- case 0xa3: /* ���L�̋��� */
- case 0xa4: /* �[���̒��� */
- case 0xa5: /* �s���g�̃W?�N�t��?�h */
- case 0xa6: /* �s���a�� */
- case 0xa7: /* ���J */
- case 0xa8: /* �[�z�̃A�T�V���N���X */
- case 0xa9: /* �u���M�̎� */
- case 0xab: /* ��������ȃ_���X */
- case 0xac: /* �n�~���O */
- case 0xad: /* ����Y��Ȃ��Łc */
- case 0xae: /* �K�^�̃L�X */
- case 0xaf: /* �T?�r�X�t�H?��? */
- case 0xb4:
-// case 0xb6: /* �t�H�O�E�H?�� */
- {
- struct skill_unit *unit2;
- struct status_change *sc_data=status_get_sc_data(bl);
- int type=SkillStatusChangeTable[sg->skill_id];
- if(sg->src_id == bl->id)
- break;
- if(sc_data) {
- if (sc_data[type].timer==-1)
- status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
- (int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- else if( (unit2=(struct skill_unit *)sc_data[type].val4) && unit2 != src ){
- if(unit2 && unit2->group && DIFF_TICK(sg->tick,unit2->group->tick)>0 )
- status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
- (int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- ts->tick-=sg->interval;
- }
- }
- } break;
-
- case 0xaa: /* �C�h�D���̗ь� */
- {
- struct skill_unit *unit2;
- struct status_change *sc_data=status_get_sc_data(bl);
- int type=SkillStatusChangeTable[sg->skill_id];
- if(sg->src_id == bl->id)
- break;
- if(sc_data) {
- if (sc_data[type].timer==-1)
- status_change_start(bl,type,sg->skill_lv,(sg->val1)>>16,(sg->val1)&0xffff,
- (int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- else if((unit2=(struct skill_unit *)sc_data[type].val4) && unit2 != src ){
- if(unit2 && unit2->group && DIFF_TICK(sg->tick,unit2->group->tick)>0 )
- status_change_start(bl,type,sg->skill_lv,(sg->val1)>>16,(sg->val1)&0xffff,
- (int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- ts->tick-=sg->interval;
- }
- }
- } break;
-
- case 0xb6: /* �t�H�O�E�H?�� */
- {
- struct skill_unit *unit2;
- struct status_change *sc_data=status_get_sc_data(bl);
- int type=SkillStatusChangeTable[sg->skill_id];
- if(sc_data) {
- if (sc_data[type].timer==-1) {
- status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
- (int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- skill_additional_effect(ss,bl,sg->skill_id,sg->skill_lv,BF_MISC,tick);
- }
- else if( (unit2=(struct skill_unit *)sc_data[type].val4) && unit2 != src ){
- if(unit2 && unit2->group && DIFF_TICK(sg->tick,unit2->group->tick)>0 ) {
- status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
- (int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- skill_additional_effect(ss,bl,sg->skill_id,sg->skill_lv,BF_MISC,tick);
- }
-// ts->tick-=sg->interval;
- }
- }
- } break;
case 0xb1: /* �f�����X�g��?�V���� */
skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
if(bl->type == BL_PC && rand()%100 < sg->skill_lv && battle_config.equipment_breaking)
pc_breakweapon((struct map_session_data *)bl);
break;
- case 0x99: /* �g?�L?�{�b�N�X */
- if(sg->src_id == bl->id) //����������ł�?�����Ȃ�
+
+ case 0x99: /* �g�[�L�[�{�b�N�X */
+ if(sg->src_id == bl->id) //����������ł��������Ȃ�
break;
if(sg->val2==0){
clif_talkiebox(&src->bl,sg->valstr);
@@ -5994,76 +5648,41 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
sg->limit=DIFF_TICK(tick,sg->tick)+5000;
sg->val2=-1; //����
}
- break;
- case 0xb2: /* ���Ȃ���_?�������ł� */
- case 0xb3: /* �S�X�y�� */
- //case 0xb6: /* �t�H�O�E�H?�� */ - moved [celest]
- //�Ƃ肠�����������Ȃ�
- break;
+ break;
+
+ //case 0xb4: /* �o�W���J */
+ /*if (battle_check_target(&src->bl,bl,BCT_ENEMY)>0 &&
+ !(status_get_mode(bl)&0x20))
+ skill_blown(&src->bl,bl,1);
+ if (sg->src_id==bl->id)
+ break;
+ if (battle_check_target(&src->bl,bl,BCT_NOENEMY)>0) {
+ type = SkillStatusChangeTable[sg->skill_id];
+ status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
+ (int)src,sg->interval+100,0);
+ }
+ break;*/
case 0xb7: /* �X�p�C�_?�E�F�b�u */
if(sg->val2==0){
int moveblock = ( bl->x/BLOCK_SIZE != src->bl.x/BLOCK_SIZE || bl->y/BLOCK_SIZE != src->bl.y/BLOCK_SIZE);
skill_additional_effect(ss,bl,sg->skill_id,sg->skill_lv,BF_MISC,tick);
+ skill_unit_move(bl,tick,0);
if(moveblock) map_delblock(bl);
- bl->x = (&src->bl)->x;
- bl->y = (&src->bl)->y;
+ bl->x = src->bl.x;
+ bl->y = src->bl.y;
if(moveblock) map_addblock(bl);
- if(bl->type == BL_MOB)
- clif_fixmobpos((struct mob_data *)bl);
- else if(bl->type == BL_PET)
- clif_fixpetpos((struct pet_data *)bl);
- else
- clif_fixpos(bl);
- clif_01ac(&src->bl);
- sg->limit=DIFF_TICK(tick,sg->tick) + skill_get_time2(sg->skill_id,sg->skill_lv);
+ skill_unit_move(bl,tick,1);
+ if(bl->type == BL_MOB)
+ clif_fixmobpos((struct mob_data *)bl);
+ else if(bl->type == BL_PET)
+ clif_fixpetpos((struct pet_data *)bl);
+ else
+ clif_fixpos(bl);
+ sg->limit = DIFF_TICK(tick,sg->tick)+skill_get_time2(sg->skill_id,sg->skill_lv);
sg->val2=bl->id;
- }
- break;
-
- // New guild skills [Celest]
- case 0xc1: // GD_LEADERSHIP
- {
- struct map_session_data *sd;
- if (srcsd && bl->type == BL_PC && (sd=(struct map_session_data *)bl) &&
- sd->status.guild_id == srcsd->status.guild_id &&
- sd != srcsd) {
- sd->state.leadership_flag = (int)src;
- status_calc_pc (sd, 0);
- }
- }
- break;
- case 0xc2: // GD_GLORYWOUNDS
- {
- struct map_session_data *sd;
- if (srcsd && bl->type == BL_PC && (sd=(struct map_session_data *)bl) &&
- sd->status.guild_id == srcsd->status.guild_id &&
- sd != srcsd) {
- sd->state.glorywounds_flag = (int)src;
- status_calc_pc (sd, 0);
- }
- }
- break;
- case 0xc3: // GD_SOULCOLD
- {
- struct map_session_data *sd;
- if (srcsd && bl->type == BL_PC && (sd=(struct map_session_data *)bl) &&
- sd->status.guild_id == srcsd->status.guild_id &&
- sd != srcsd) {
- sd->state.soulcold_flag = (int)src;
- status_calc_pc (sd, 0);
- }
- }
- break;
- case 0xc4: // GD_HAWKEYES
- {
- struct map_session_data *sd;
- if (srcsd && bl->type == BL_PC && (sd=(struct map_session_data *)bl) &&
- sd->status.guild_id == srcsd->status.guild_id &&
- sd != srcsd) {
- sd->state.hawkeyes_flag = (int)src;
- status_calc_pc (sd, 0);
- }
+ sg->interval = -1;
+ src->range = 0;
}
break;
@@ -6072,6 +5691,7 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
printf("skill_unit_onplace: Unknown skill unit id=%d block=%d\n",sg->unit_id,bl->id);
break;*/
}
+
if(bl->type==BL_MOB && ss!=bl) /* �X�L���g�p?����MOB�X�L�� */
{
if(battle_config.mob_changetarget_byskill == 1)
@@ -6095,77 +5715,41 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
int skill_unit_onout(struct skill_unit *src,struct block_list *bl,unsigned int tick)
{
struct skill_unit_group *sg;
+ struct status_change *sc_data;
+ int type;
nullpo_retr(0, src);
nullpo_retr(0, bl);
nullpo_retr(0, sg=src->group);
+ sc_data = status_get_sc_data(bl);
+ type = SkillStatusChangeTable[sg->skill_id];
- if( bl->prev==NULL || !src->alive )
- return 0;
-
- if( bl->type!=BL_PC && bl->type!=BL_MOB )
+ if (bl->prev==NULL || !src->alive ||
+ (bl->type == BL_PC && pc_isdead((struct map_session_data *)bl)))
return 0;
switch(sg->unit_id){
- case 0x7e: /* �Z�C�t�e�B�E�H?�� */
- case 0x85: /* �j��?�} */
+ case 0x7e: /* �Z�C�t�e�B�E�H�[�� */
+ case 0x85: /* �j���[�} */
case 0x8e: /* �N�@�O�}�C�A */
- {
- struct status_change *sc_data=status_get_sc_data(bl);
- int type=
- (sg->unit_id==0x85)?SC_PNEUMA:
- ((sg->unit_id==0x7e)?SC_SAFETYWALL:
- SC_QUAGMIRE);
- if((type != SC_QUAGMIRE || bl->type != BL_MOB) &&
- sc_data && sc_data[type].timer!=-1 && ((struct skill_unit *)sc_data[type].val2)==src){
- status_change_end(bl,type,-1);
- }
- } break;
-
- case 0x91: /* �A���N���X�l�A */
- {
- struct block_list *target=map_id2bl(sg->val2);
- if( target && target==bl ){
- status_change_end(bl,SC_ANKLE,-1);
- sg->limit=DIFF_TICK(tick,sg->tick)+1000;
- }
+ case 0x9a: /* �{���P�[�m */
+ case 0x9b: /* �f�����[�W */
+ case 0x9c: /* �o�C�I�����g�Q�C�� */
+ if (type==SC_QUAGMIRE && bl->type==BL_MOB)
+ break;
+ if (sc_data && sc_data[type].timer!=-1 && sc_data[type].val2==(int)src) {
+ status_change_end(bl,type,-1);
}
break;
-// case 0xb5:
- case 0xb8:
- {
- struct block_list *target=map_id2bl(sg->val2);
- if( target==bl )
- status_change_end(bl,SC_SPIDERWEB,-1);
+ case 0x91: /* �A���N���X�l�A */
+ {
+ struct block_list *target = map_id2bl(sg->val2);
+ if(target && target == bl){
+ status_change_end(bl,SC_ANKLE,-1);
sg->limit=DIFF_TICK(tick,sg->tick)+1000;
}
break;
- case 0xb6:
- {
- struct block_list *target=map_id2bl(sg->val2);
- struct status_change *sc_data=status_get_sc_data(bl);
- if( target==bl ) {
- status_change_end(bl,SC_FOGWALL,-1);
- if (sc_data && sc_data[SC_BLIND].timer!=-1)
- sc_data[SC_BLIND].timer = add_timer(
- gettick() + 30000, status_change_timer, bl->id, 0);
- }
- //sg->limit=DIFF_TICK(tick,sg->tick)+1000;
- }
- break;
- case 0x9a: /* �{���P?�m */
- case 0x9b: /* �f����?�W */
- case 0x9c: /* �o�C�I�����g�Q�C�� */
- {
- struct status_change *sc_data=status_get_sc_data(bl);
- struct skill_unit *su;
- int type=SkillStatusChangeTable[sg->skill_id];
- if( sc_data && sc_data[type].timer!=-1 && (su=((struct skill_unit *)sc_data[type].val2)) && su == src ){
- status_change_end(bl,type,-1);
- }
- }
- break;
-
+ }
case 0x9e: /* �q��S */
case 0x9f: /* �j�����h�̉� */
case 0xa0: /* �i���̍��� */
@@ -6185,24 +5769,32 @@ int skill_unit_onout(struct skill_unit *src,struct block_list *bl,unsigned int t
case 0xae: /* �K�^�̃L�X */
case 0xaf: /* �T?�r�X�t�H?��? */
case 0xb4:
- {
- struct status_change *sc_data=status_get_sc_data(bl);
- struct skill_unit *su;
- int type=SkillStatusChangeTable[sg->skill_id];
- if( sc_data && sc_data[type].timer!=-1 && (su=((struct skill_unit *)sc_data[type].val4)) && su == src ){
- status_change_end(bl,type,-1);
- }
+ if (sc_data[type].timer!=-1 && sc_data[type].val4==(int)src) {
+ status_change_end(bl,type,-1);
}
break;
+
+ case 0xb6:
+ {
+ struct block_list *target = map_id2bl(sg->val2);
+ if(target && target==bl) {
+ status_change_end(bl,SC_FOGWALL,-1);
+ if (sc_data && sc_data[SC_BLIND].timer!=-1)
+ sc_data[SC_BLIND].timer = add_timer(
+ gettick() + 30000, status_change_timer, bl->id, 0);
+ }
+ break;
+ }
+
case 0xb7: /* �X�p�C�_?�E�F�b�u */
{
- struct block_list *target=map_id2bl(sg->val2);
- if( target && target==bl )
+ struct block_list *target = map_id2bl(sg->val2);
+ if (target && target==bl)
status_change_end(bl,SC_SPIDERWEB,-1);
- sg->limit=DIFF_TICK(tick,sg->tick)+1000;
+ sg->limit = DIFF_TICK(tick,sg->tick)+1000;
+ break;
}
- break;
- // New guild skills [Celest]
+ // New guild skills [Celest]
case 0xc1: // GD_LEADERSHIP
{
struct map_session_data *sd;
@@ -6231,73 +5823,53 @@ int skill_unit_onout(struct skill_unit *src,struct block_list *bl,unsigned int t
sd->state.hawkeyes_flag = 0;
}
break;
-
/* default:
if(battle_config.error_log)
printf("skill_unit_onout: Unknown skill unit id=%d block=%d\n",sg->unit_id,bl->id);
break;*/
}
- skill_unitgrouptickset_delete(bl,sg);
+
return 0;
}
+
/*==========================================
- * �X�L�����j�b�g�̍폜�C�x���g
+ * �X�L�����j�b�g���ʔ���/���E����(foreachinarea)
+ * bl: ���j�b�g(BL_PC/BL_MOB)
*------------------------------------------
*/
-int skill_unit_ondelete(struct skill_unit *src,struct block_list *bl,unsigned int tick)
+int skill_unit_effect(struct block_list *bl,va_list ap)
{
- struct skill_unit_group *sg;
+ struct skill_unit *unit;
+ struct skill_unit_group *group;
+ int flag;
+ unsigned int tick;
- nullpo_retr(0, src);
nullpo_retr(0, bl);
- nullpo_retr(0, sg = src->group);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, unit=va_arg(ap,struct skill_unit*));
+ tick = va_arg(ap,unsigned int);
+ flag = va_arg(ap,unsigned int);
- if( bl->prev==NULL || !src->alive )
+ if (bl->type!=BL_PC && bl->type!=BL_MOB)
return 0;
- if( bl->type!=BL_PC && bl->type!=BL_MOB )
+ if (!unit->alive || bl->prev==NULL)
return 0;
- switch(sg->unit_id){
- case 0x85: /* �j��?�} */
- case 0x7e: /* �Z�C�t�e�B�E�H?�� */
- case 0x8e: /* �N�@�O�}�C�� */
- case 0x9a: /* �{���P?�m */
- case 0x9b: /* �f����?�W */
- case 0x9c: /* �o�C�I�����g�Q�C�� */
- case 0x9e: /* �q��S */
- case 0x9f: /* �j�����h�̉� */
- case 0xa0: /* �i���̍��� */
- case 0xa1: /* ?���ۂ̋��� */
- case 0xa2: /* �j?�x�����O�̎w�� */
- case 0xa3: /* ���L�̋��� */
- case 0xa4: /* �[���̒��� */
- case 0xa5: /* �s���g�̃W?�N�t��?�h */
- case 0xa6: /* �s���a�� */
- case 0xa7: /* ���J */
- case 0xa8: /* �[�z�̃A�T�V���N���X */
- case 0xa9: /* �u���M�̎� */
- case 0xaa: /* �C�h�D���̗ь� */
- case 0xab: /* ��������ȃ_���X */
- case 0xac: /* �n�~���O */
- case 0xad: /* ����Y��Ȃ��Łc */
- case 0xae: /* �K�^�̃L�X */
- case 0xaf: /* �T?�r�X�t�H?��? */
- case 0xb4:
- case 0xc1:
- case 0xc2:
- case 0xc3:
- case 0xc4:
- return skill_unit_onout(src,bl,tick);
+ nullpo_retr(0, group=unit->group);
-/* default:
- if(battle_config.error_log)
- printf("skill_unit_ondelete: Unknown skill unit id=%d block=%d\n",sg->unit_id,bl->id);
- break;*/
+ if (flag)
+ skill_unit_onplace(unit,bl,tick);
+ else {
+ skill_unit_onout(unit,bl,tick);
+ unit = map_find_skill_unit_oncell(bl,bl->x,bl->y,group->skill_id,unit);
+ if (unit)
+ skill_unit_onplace(unit,bl,tick);
}
- skill_unitgrouptickset_delete(bl,sg);
+
return 0;
}
+
/*==========================================
* �X�L�����j�b�g�̌��E�C�x���g
*------------------------------------------
@@ -6435,10 +6007,7 @@ int skill_castend_pos( int tid, unsigned int tick, int id,int data )
return 0;
}
- if(battle_config.pc_skill_reiteration == 0) {
- range = -1;
- switch(sd->skillid) {
- case MG_SAFETYWALL:
+ /*case MG_SAFETYWALL:
case WZ_FIREPILLAR:
case HT_SKIDTRAP:
case HT_LANDMINE:
@@ -6451,28 +6020,23 @@ int skill_castend_pos( int tid, unsigned int tick, int id,int data )
case HT_CLAYMORETRAP:
case HT_TALKIEBOX:
case AL_WARP:
- case PF_SPIDERWEB: /* �X�p�C�_?�E�F�b�u */
- case RG_GRAFFITI: /* �O���t�B�e�B */
+ case PF_SPIDERWEB:
+ case RG_GRAFFITI:
range = 0;
break;
case AL_PNEUMA:
range = 1;
- break;
- }
- if(range >= 0) {
- if(skill_check_unit_range(sd->bl.m,sd->skillx,sd->skilly,range,sd->skillid) > 0) {
- clif_skill_fail(sd,sd->skillid,0,0);
- sd->canact_tick = tick;
- sd->canmove_tick = tick;
- sd->skillitem = sd->skillitemlv = -1;
- return 0;
- }
- }
+ break;*/
+ if (!battle_config.pc_skill_reiteration &&
+ skill_get_unit_flag(sd->skillid)&UF_NOREITERATION &&
+ skill_check_unit_range(sd->bl.m,sd->skillx,sd->skilly,sd->skillid,sd->skilllv)) {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ sd->canact_tick = tick;
+ sd->canmove_tick = tick;
+ sd->skillitem = sd->skillitemlv = -1;
+ return 0;
}
- if(battle_config.pc_skill_nofootset) {
- range = -1;
- switch(sd->skillid) {
- case WZ_FIREPILLAR:
+ /*case WZ_FIREPILLAR:
case HT_SKIDTRAP:
case HT_LANDMINE:
case HT_ANKLESNARE:
@@ -6483,25 +6047,22 @@ int skill_castend_pos( int tid, unsigned int tick, int id,int data )
case HT_BLASTMINE:
case HT_CLAYMORETRAP:
case HT_TALKIEBOX:
- case PF_SPIDERWEB: /* �X�p�C�_?�E�F�b�u */
+ case PF_SPIDERWEB:
case WZ_ICEWALL:
range = 2;
break;
case AL_WARP:
range = 0;
- break;
- }
- if(range >= 0) {
- if(skill_check_unit_range2(sd->bl.m,sd->skillx,sd->skilly,range) > 0) {
- clif_skill_fail(sd,sd->skillid,0,0);
- sd->canact_tick = tick;
- sd->canmove_tick = tick;
- sd->skillitem = sd->skillitemlv = -1;
- return 0;
- }
- }
+ break;*/
+ if (battle_config.pc_skill_nofootset &&
+ skill_get_unit_flag(sd->skillid)&UF_NOFOOTSET &&
+ skill_check_unit_range2(sd->bl.m,sd->skillx,sd->skilly,sd->skillid,sd->skilllv)) {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ sd->canact_tick = tick;
+ sd->canmove_tick = tick;
+ sd->skillitem = sd->skillitemlv = -1;
+ return 0;
}
-
if(battle_config.pc_land_skill_limit) {
maxcount = skill_get_maxcount(sd->skillid);
if(maxcount > 0) {
@@ -7523,22 +7084,22 @@ int skill_use_id( struct map_session_data *sd, int target_id,
return 0;
}
break;
- // removed on 12/14's patch [celest]
- //case AS_SPLASHER: /* �x�i���X�v���b�V��? */
- /* {
- struct status_change *t_sc_data = status_get_sc_data(bl);
- if(t_sc_data && t_sc_data[SC_POISON].timer==-1){
- clif_skill_fail(sd,skill_num,0,10);
- return 0;
- }
- }
- break;*/
case PF_MEMORIZE: /* �������C�Y */
casttime = 12000;
break;
case HW_MAGICPOWER:
casttime = 700;
break;
+ case HP_BASILICA: /* �o�W���J */
+ if (skill_check_unit_range(sd->bl.m,sd->bl.x,sd->bl.y,sd->skillid,sd->skilllv)) {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ return 0;
+ }
+ if (skill_check_unit_range2(sd->bl.m,sd->bl.x,sd->bl.y,sd->skillid,sd->skilllv)) {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ return 0;
+ }
+ break;
case GD_BATTLEORDER:
case GD_REGENERATION:
case GD_RESTORE:
@@ -7991,13 +7552,14 @@ int skill_devotion3(struct block_list *bl,int target)
int n,r=0;
nullpo_retr(1, bl);
+ md = (struct map_session_data *)bl;
- if( (md = (struct map_session_data *)bl) == NULL || (sd = map_id2sd(target)) == NULL )
+ if ((sd = map_id2sd(target))==NULL)
return 1;
else
r = distance(bl->x,bl->y,sd->bl.x,sd->bl.y);
- if(pc_checkskill(sd,CR_DEVOTION)+6 < r){ // ���e��?�𒴂��Ă�
+ if(pc_checkskill(md,CR_DEVOTION)+6 < r){ // ���e��?�𒴂��Ă�
for(n=0;n<5;n++)
if(md->dev.val1[n]==target)
md->dev.val2[n]=0; // ���ꂽ���́A?��؂邾��
@@ -8249,12 +7811,28 @@ int skill_abra_dataset(int skilllv)
//NPC�X�L���̓_��
if(skill >= NPC_PIERCINGATT && skill <= NPC_SUMMONMONSTER) return 0;
//���t�X�L���̓_��
- if(skill_is_danceskill(skill)) return 0;
+ if (skill_get_unit_flag(skill)&UF_DANCE) return 0;
return skill;
}
/*==========================================
+ * �o�W���J�̃Z����ݒ肷��
+ *------------------------------------------
+ */
+void skill_basilica_cell(struct skill_unit *unit,int flag)
+{
+ int i,x,y,range = skill_get_unit_range(HP_BASILICA);
+ int size = range*2+1;
+
+ for (i=0;i<size*size;i++) {
+ x = unit->bl.x+(i%size-range);
+ y = unit->bl.y+(i/size-range);
+ map_setcell(unit->bl.m,x,y,flag);
+ }
+}
+
+/*==========================================
*
*------------------------------------------
*/
@@ -8293,16 +7871,20 @@ int skill_clear_element_field(struct block_list *bl)
{
struct mob_data *md=NULL;
struct map_session_data *sd=NULL;
- int i,skillid;
+ int i,max,skillid;
nullpo_retr(0, bl);
- if(bl->type==BL_MOB)
- md=(struct mob_data *)bl;
- if(bl->type==BL_PC)
- sd=(struct map_session_data *)bl;
+ if (bl->type==BL_MOB) {
+ max = MAX_MOBSKILLUNITGROUP;
+ md = (struct mob_data *)bl;
+ } else if(bl->type==BL_PC) {
+ max = MAX_SKILLUNITGROUP;
+ sd = (struct map_session_data *)bl;
+ } else
+ return 0;
- for(i=0;i<MAX_MOBSKILLUNITGROUP;i++){
+ for (i=0;i<max;i++) {
if(sd){
skillid=sd->skillunit[i].skill_id;
if(skillid==SA_DELUGE||skillid==SA_VOLCANO||skillid==SA_VIOLENTGALE||skillid==SA_LANDPROTECTOR)
@@ -8372,7 +7954,8 @@ int skill_idun_heal(struct block_list *bl, va_list ap )
* �w���??��src��?���ėL?�ȃ^?�Q�b�g��bl��?��?����(foreachinarea)
*------------------------------------------
*/
-int skill_count_target(struct block_list *bl, va_list ap ){
+int skill_count_target(struct block_list *bl, va_list ap)
+{
struct block_list *src;
int *c;
@@ -8528,48 +8111,6 @@ int skill_type_cloaking(struct block_list *bl)
*/
/*==========================================
- * ���t/�_���X�X�L�����ǂ�������
- * ��? �X�L��ID
- * ?�� �_���X����Ȃ�=0 ���t=2 ����ȊO�̃_���X=1
- *------------------------------------------
- */
-int skill_is_danceskill(int id)
-{
- int i;
- switch(id){
- case BD_LULLABY: /* �q��� */
- case BD_RICHMANKIM: /* �j�����h�̉� */
- case BD_ETERNALCHAOS: /* �i���̍��� */
- case BD_DRUMBATTLEFIELD: /* ?���ۂ̋��� */
- case BD_RINGNIBELUNGEN: /* �j?�x�����O�̎w�� */
- case BD_ROKISWEIL: /* ���L�̋��� */
- case BD_INTOABYSS: /* �[���̒��� */
- case BD_SIEGFRIED: /* �s���g�̃W?�N�t��?�h */
- case BD_RAGNAROK: /* �_?��?�� */
- case CG_MOONLIT: /* ������̐�ɗ�����Ԃт� */
- i=2;
- break;
- case BA_DISSONANCE: /* �s���a�� */
- case BA_FROSTJOKE: /* �����W��?�N */
- case BA_WHISTLE: /* ���J */
- case BA_ASSASSINCROSS: /* �[�z�̃A�T�V���N���X */
- case BA_POEMBRAGI: /* �u���M�̎� */
- case BA_APPLEIDUN: /* �C�h�D���̗ь� */
- case DC_UGLYDANCE: /* ��������ȃ_���X */
- case DC_SCREAM: /* �X�N��?�� */
- case DC_HUMMING: /* �n�~���O */
- case DC_DONTFORGETME: /* ����Y��Ȃ��Łc */
- case DC_FORTUNEKISS: /* �K�^�̃L�X */
- case DC_SERVICEFORYOU: /* �T?�r�X�t�H?��? */
- i=1;
- break;
- default:
- i=0;
- }
- return i;
-}
-
-/*==========================================
* ���t/�_���X����߂�
* flag 1�ō��t���Ȃ瑊���Ƀ��j�b�g��C����
*
@@ -8650,10 +8191,13 @@ struct skill_unit *skill_initunit(struct skill_unit_group *group,int idx,int x,i
map_addblock(&unit->bl);
clif_skill_setunit(unit);
+
+// if (group->skill_id==HP_BASILICA)
+// skill_basilica_cell(unit,CELL_SETBASILICA);
+
return unit;
}
-int skill_unit_timer_sub_ondelete( struct block_list *bl, va_list ap );
/*==========================================
* �X�L�����j�b�g�폜
*------------------------------------------
@@ -8661,7 +8205,6 @@ int skill_unit_timer_sub_ondelete( struct block_list *bl, va_list ap );
int skill_delunit(struct skill_unit *unit)
{
struct skill_unit_group *group;
- int range;
nullpo_retr(0, unit);
if(!unit->alive)
@@ -8671,11 +8214,15 @@ int skill_delunit(struct skill_unit *unit)
/* onlimit�C�x���g�Ăяo�� */
skill_unit_onlimit( unit,gettick() );
- /* ondelete�C�x���g�Ăяo�� */
- range=group->range;
- map_foreachinarea( skill_unit_timer_sub_ondelete, unit->bl.m,
- unit->bl.x-range,unit->bl.y-range,unit->bl.x+range,unit->bl.y+range,0,
- &unit->bl,gettick() );
+ /* onout�C�x���g�Ăяo�� */
+ if (!unit->range) {
+ map_foreachinarea(skill_unit_effect,unit->bl.m,
+ unit->bl.x,unit->bl.y,unit->bl.x,unit->bl.y,0,
+ &unit->bl,gettick(),0);
+ }
+
+// if (group->skill_id==HP_BASILICA)
+// skill_basilica_cell(unit,CELL_CLRBASILICA);
clif_skill_delunit(unit);
@@ -8691,7 +8238,7 @@ int skill_delunit(struct skill_unit *unit)
* �X�L�����j�b�g�O��?�v������
*------------------------------------------
*/
-static int skill_unit_group_newid=10;
+static int skill_unit_group_newid = MAX_SKILL_DB;
struct skill_unit_group *skill_initunitgroup(struct block_list *src,
int count,int skillid,int skilllv,int unit_id)
{
@@ -8743,7 +8290,7 @@ struct skill_unit_group *skill_initunitgroup(struct block_list *src,
group->guild_id=status_get_guild_id(src);
group->group_id=skill_unit_group_newid++;
if(skill_unit_group_newid<=0)
- skill_unit_group_newid=10;
+ skill_unit_group_newid = MAX_SKILL_DB;
group->unit=(struct skill_unit *)aCalloc(count,sizeof(struct skill_unit));
group->unit_count=count;
group->val1=group->val2=0;
@@ -8751,39 +8298,23 @@ struct skill_unit_group *skill_initunitgroup(struct block_list *src,
group->skill_lv=skilllv;
group->unit_id=unit_id;
group->map=src->m;
- group->range=0;
group->limit=10000;
group->interval=1000;
group->tick=gettick();
group->valstr=NULL;
- if( skill_is_danceskill(skillid) ){
+ if (skill_get_unit_flag(skillid)&UF_DANCE) {
struct map_session_data *sd = NULL;
if(src->type==BL_PC && (sd=(struct map_session_data *)src) ){
sd->skillid_dance=skillid;
sd->skilllv_dance=skilllv;
}
status_change_start(src,SC_DANCING,skillid,(int)group,0,0,skill_get_time(skillid,skilllv)+1000,0);
- switch(skillid){ //���t�X�L���͑������_���X?�Ԃɂ���
- case BD_LULLABY: /* �q��� */
- case BD_RICHMANKIM: /* �j�����h�̉� */
- case BD_ETERNALCHAOS: /* �i���̍��� */
- case BD_DRUMBATTLEFIELD: /* ?���ۂ̋��� */
- case BD_RINGNIBELUNGEN: /* �j?�x�����O�̎w�� */
- case BD_ROKISWEIL: /* ���L�̋��� */
- case BD_INTOABYSS: /* �[���̒��� */
- case BD_SIEGFRIED: /* �s���g�̃W?�N�t��?�h */
- case BD_RAGNAROK: /* �_?��?�� */
- case CG_MOONLIT: /* ������̐�ɗ�����Ԃт� */
- {
- int range=1;
- int c=0;
- if(sd){
- map_foreachinarea(skill_check_condition_use_sub,sd->bl.m,
- sd->bl.x-range,sd->bl.y-range,
- sd->bl.x+range,sd->bl.y+range,BL_PC,&sd->bl,&c);
- }
- }
+ //���t�X�L���͑������_���X��Ԃɂ���
+ if (sd && skill_get_unit_flag(skillid)&UF_ENSEMBLE) {
+ int c=0;
+ map_foreachinarea(skill_check_condition_use_sub,sd->bl.m,
+ sd->bl.x-1,sd->bl.y-1,sd->bl.x+1,sd->bl.y+1,BL_PC,&sd->bl,&c);
}
}
return group;
@@ -8803,7 +8334,8 @@ int skill_delunitgroup(struct skill_unit_group *group)
return 0;
src=map_id2bl(group->src_id);
- if( skill_is_danceskill(group->skill_id) ){ //�_���X�X�L���̓_���X?�Ԃ���������
+ //�_���X�X�L���̓_���X��Ԃ���������
+ if (skill_get_unit_flag(group->skill_id)&UF_DANCE) {
if(src)
status_change_end(src,SC_DANCING,-1);
}
@@ -8841,13 +8373,14 @@ int skill_clear_unitgroup(struct block_list *src)
if(src->type==BL_PC){
group=((struct map_session_data *)src)->skillunit;
maxsug=MAX_SKILLUNITGROUP;
- }else if(src->type==BL_MOB){
+ } else if(src->type==BL_MOB){
group=((struct mob_data *)src)->skillunit;
maxsug=MAX_MOBSKILLUNITGROUP;
- }else if(src->type==BL_PET){ // [Valaris]
+ } else if(src->type==BL_PET){ // [Valaris]
group=((struct pet_data *)src)->skillunit;
maxsug=MAX_MOBSKILLUNITGROUP;
- }
+ } else
+ return 0;
if(group){
int i;
for(i=0;i<maxsug;i++)
@@ -8857,31 +8390,19 @@ int skill_clear_unitgroup(struct block_list *src)
return 0;
}
-/*
- * ���ǫ����������Ǫ��������������
- */
-int skill_unit_overlap_type(int skill_id)
-{
- switch (skill_id) {
- case WZ_STORMGUST:
- case WZ_VERMILION:
- return 1; // �ɪ��骫��۰�������?����������
- default:
- return 0; // ?۰�������?����������
- }
-}
-
/*==========================================
* �X�L�����j�b�g�O��?�v�̔�e��tick?��
*------------------------------------------
*/
struct skill_unit_group_tickset *skill_unitgrouptickset_search(
- struct block_list *bl, struct skill_unit_group *sg)
+ struct block_list *bl,struct skill_unit_group *group,int tick)
{
int i,j=-1,k,s,id;
struct skill_unit_group_tickset *set;
nullpo_retr(0, bl);
+ if (group->interval==-1)
+ return NULL;
if (bl->type == BL_PC)
set = ((struct map_session_data *)bl)->skillunittick;
@@ -8890,16 +8411,16 @@ struct skill_unit_group_tickset *skill_unitgrouptickset_search(
else
return 0;
- if (skill_unit_overlap_type(sg->skill_id))
- id = s = sg->skill_id;
+ if (skill_get_unit_flag(group->skill_id)&UF_NOOVERLAP)
+ id = s = group->skill_id;
else
- id = s = sg->group_id;
+ id = s = group->group_id;
for (i=0; i<MAX_SKILLUNITGROUPTICKSET; i++) {
k = (i+s) % MAX_SKILLUNITGROUPTICKSET;
if (set[k].id == id)
return &set[k];
- else if (j == -1 && set[k].id == 0)
+ else if (j==-1 && (DIFF_TICK(tick,set[k].tick)>0 || set[k].id==0))
j=k;
}
@@ -8908,101 +8429,41 @@ struct skill_unit_group_tickset *skill_unitgrouptickset_search(
sprintf (tmp_output, "skill_unitgrouptickset_search: tickset is full\n");
ShowWarning (tmp_output);
}
- for (i = 0; i<MAX_SKILLUNITGROUPTICKSET; i++)
- set[k].id = 0;
j = id % MAX_SKILLUNITGROUPTICKSET;
}
set[j].id = id;
+ set[j].tick = tick;
return &set[j];
}
/*==========================================
- * �X�L�����j�b�g�O��?�v�̔�e��tick�폜
- *------------------------------------------
- */
-int skill_unitgrouptickset_delete(
- struct block_list *bl, struct skill_unit_group *sg)
-{
- int i, k, s, id;
- struct skill_unit_group_tickset *set=NULL;
-
- nullpo_retr(0, bl);
- if (bl->type == BL_PC)
- set=((struct map_session_data *)bl)->skillunittick;
- else if (bl->type == BL_MOB)
- set=((struct mob_data *)bl)->skillunittick;
- else
- return 0;
-
- if (skill_unit_overlap_type(sg->skill_id))
- id = s = sg->skill_id;
- else
- id = s = sg->group_id;
-
- for(i=0; i<MAX_SKILLUNITGROUPTICKSET; i++) {
- k = (i+s) % MAX_SKILLUNITGROUPTICKSET;
- if (set[k].id == id) {
- set[k].id = 0;
- break;
- }
- }
-// if (i == MAX_SKILLUNITGROUPTICKSET && battle_config.error_log) {
-// printf("skill_unitgrouptickset_delete: tickset not found\n");
-// }
-
- return 0;
-}
-
-/*==========================================
* �X�L�����j�b�g�^�C�}??��?���p(foreachinarea)
*------------------------------------------
*/
int skill_unit_timer_sub_onplace( struct block_list *bl, va_list ap )
{
- struct block_list *src;
- struct skill_unit *su;
+ struct skill_unit *unit;
+ struct skill_unit_group *group;
unsigned int tick;
nullpo_retr(0, bl);
nullpo_retr(0, ap);
- src=va_arg(ap,struct block_list*);
+ unit = va_arg(ap,struct skill_unit *);
+ tick = va_arg(ap,unsigned int);
- tick=va_arg(ap,unsigned int);
- su = (struct skill_unit *)src;
-
- if( su && su->alive ) {
- struct skill_unit_group *sg;
- sg = su->group;
- if(sg && battle_check_target(src,bl,sg->target_flag )>0)
- skill_unit_onplace( su, bl, tick );
- }
- return 0;
-}
+ if (bl->type!=BL_PC && bl->type!=BL_MOB)
+ return 0;
+ if (!unit->alive || bl->prev==NULL)
+ return 0;
-/*==========================================
- * �X�L�����j�b�g�^�C�}?�폜?���p(foreachinarea)
- *------------------------------------------
- */
-int skill_unit_timer_sub_ondelete( struct block_list *bl, va_list ap )
-{
- struct block_list *src;
- struct skill_unit *su;
- unsigned int tick;
+ nullpo_retr(0, group=unit->group);
- nullpo_retr(0, bl);
- nullpo_retr(0, ap);
- src=va_arg(ap,struct block_list*);
+ if (battle_check_target(&unit->bl,bl,group->target_flag)<=0)
+ return 0;
- tick=va_arg(ap,unsigned int);
- su = (struct skill_unit *)src;
+ skill_unit_onplace_timer(unit,bl,tick);
- if( su && su->alive ){
- struct skill_unit_group *sg;
- sg = su->group;
- if( sg && battle_check_target(src,bl,sg->target_flag )>0 )
- skill_unit_ondelete( su, bl, tick );
- }
return 0;
}
@@ -9020,28 +8481,37 @@ int skill_unit_timer_sub( struct block_list *bl, va_list ap )
nullpo_retr(0, bl);
nullpo_retr(0, ap);
nullpo_retr(0, unit=(struct skill_unit *)bl);
- nullpo_retr(0, group=unit->group);
tick=va_arg(ap,unsigned int);
if(!unit->alive)
return 0;
- range=(unit->range!=0)?unit->range:group->range;
+ nullpo_retr(0, group=unit->group);
+ range = unit->range;
- /* onplace�C�x���g�Ăяo�� */
- if(unit->alive && unit->range>=0){
- map_foreachinarea( skill_unit_timer_sub_onplace, bl->m,
- bl->x-range,bl->y-range,bl->x+range,bl->y+range,0,
- bl,tick);
- if(group->unit_id == 0xaa && DIFF_TICK(tick,group->tick)>=6000*group->val2){
- map_foreachinarea( skill_idun_heal, bl->m,
- bl->x-range,bl->y-range,bl->x+range,bl->y+range,0,unit);
- group->val2++;
+ /* onplace_timer�C�x���g�Ăяo�� */
+ if (range>=0 && group->interval!=-1) {
+ map_foreachinarea(skill_unit_timer_sub_onplace, bl->m,
+ bl->x-range,bl->y-range,bl->x+range,bl->y+range,0,bl,tick);
+ if (!unit->alive)
+ return 0;
+ // �}�O�k�X�͔����������j�b�g�͍폜����
+ if (group->skill_id==PR_MAGNUS && unit->val2) {
+ skill_delunit(unit);
+ return 0;
}
}
+ // �C�h�D���̗ь�ɂ���
+ if (group->unit_id==0xaa && DIFF_TICK(tick,group->tick)>=6000*group->val3) {
+ struct block_list *src = map_id2bl(group->src_id);
+ int range = skill_get_unit_layout_type(group->skill_id,group->skill_lv);
+ nullpo_retr(0, src);
+ map_foreachinarea(skill_idun_heal,src->m,
+ src->x-range,src->y-range,src->x+range,src->y+range,0,unit);
+ group->val3++;
+ }
/* ���Ԑ؂�폜 */
- if(unit->alive &&
- (DIFF_TICK(tick,group->tick)>=group->limit || DIFF_TICK(tick,group->tick)>=unit->limit) ){
+ if((DIFF_TICK(tick,group->tick)>=group->limit || DIFF_TICK(tick,group->tick)>=unit->limit)){
switch(group->unit_id){
case 0x8f: /* �u���X�g�}�C�� */
group->unit_id = 0x8c;
@@ -9117,92 +8587,33 @@ int skill_unit_timer( int tid,unsigned int tick,int id,int data)
* �X�L�����j�b�g�ړ���?���p(foreachinarea)
*------------------------------------------
*/
-int skill_unit_out_all_sub( struct block_list *bl, va_list ap )
-{
- struct skill_unit *unit;
- struct skill_unit_group *group;
- struct block_list *src;
- int range;
- unsigned int tick;
-
- nullpo_retr(0, bl);
- nullpo_retr(0, ap);
- nullpo_retr(0, src=va_arg(ap,struct block_list*));
- nullpo_retr(0, unit=(struct skill_unit *)bl);
- nullpo_retr(0, group=unit->group);
-
- tick=va_arg(ap,unsigned int);
-
- if(!unit->alive || src->prev==NULL)
- return 0;
-
- range=(unit->range!=0)?unit->range:group->range;
-
- if( range<0 || battle_check_target(bl,src,group->target_flag )<=0 )
- return 0;
-
- if( src->x >= bl->x-range && src->x <= bl->x+range &&
- src->y >= bl->y-range && src->y <= bl->y+range )
- skill_unit_onout( unit, src, tick );
-
- return 0;
-}
-
-
-/*==========================================
- * �X�L�����j�b�g�ړ���?��
- *------------------------------------------
- */
-int skill_unit_out_all( struct block_list *bl,unsigned int tick,int range)
-{
- nullpo_retr(0, bl);
-
- if( bl->prev==NULL )
- return 0;
-
- if(range<7)
- range=7;
- map_foreachinarea( skill_unit_out_all_sub,
- bl->m,bl->x-range,bl->y-range,bl->x+range,bl->y+range,BL_SKILL,
- bl,tick );
-
- return 0;
-}
-
-/*==========================================
- * �X�L�����j�b�g�ړ���?���p(foreachinarea)
- *------------------------------------------
- */
int skill_unit_move_sub( struct block_list *bl, va_list ap )
{
- struct skill_unit *unit;
+ struct skill_unit *unit = (struct skill_unit *)bl;
struct skill_unit_group *group;
- struct block_list *src;
- int range;
- unsigned int tick;
+ struct block_list *target;
+ unsigned int tick,flag;
nullpo_retr(0, bl);
nullpo_retr(0, ap);
- nullpo_retr(0, unit=(struct skill_unit *)bl);
- nullpo_retr(0, src=va_arg(ap,struct block_list*));
-
- tick=va_arg(ap,unsigned int);
+ nullpo_retr(0, target=va_arg(ap,struct block_list*));
+ tick = va_arg(ap,unsigned int);
+ flag = va_arg(ap,int);
- if(!unit->alive || src->prev==NULL)
+ if (target->type!=BL_PC && target->type!=BL_MOB)
return 0;
- if((group=unit->group) == NULL)
+ nullpo_retr(0, group=unit->group);
+ if (group->interval!=-1)
return 0;
- range=(unit->range!=0)?unit->range:group->range;
- if( range<0 || battle_check_target(bl,src,group->target_flag )<=0 )
+ if (!unit->alive || target->prev==NULL)
return 0;
- if( src->x >= bl->x-range && src->x <= bl->x+range &&
- src->y >= bl->y-range && src->y <= bl->y+range )
- skill_unit_onplace( unit, src, tick );
+ if (flag)
+ skill_unit_onplace(unit,target,tick);
else
- skill_unit_onout( unit, src, tick );
+ skill_unit_onout(unit,target,tick);
return 0;
}
@@ -9211,54 +8622,16 @@ int skill_unit_move_sub( struct block_list *bl, va_list ap )
* �X�L�����j�b�g�ړ���?��
*------------------------------------------
*/
-int skill_unit_move( struct block_list *bl,unsigned int tick,int range)
+int skill_unit_move(struct block_list *bl,unsigned int tick,int flag)
{
nullpo_retr(0, bl);
- if( bl->prev==NULL )
+ if(bl->prev==NULL )
return 0;
- if(range<7)
- range=7;
- map_foreachinarea( skill_unit_move_sub,
- bl->m,bl->x-range,bl->y-range,bl->x+range,bl->y+range,BL_SKILL,
- bl,tick );
-
- return 0;
-}
+ map_foreachinarea(skill_unit_move_sub,
+ bl->m,bl->x,bl->y,bl->x,bl->y,BL_SKILL,bl,tick,flag);
-/*==========================================
- * �X�L�����j�b�g��?�̈ړ���?��(foreachinarea)
- *------------------------------------------
- */
-int skill_unit_move_unit_group_sub( struct block_list *bl, va_list ap )
-{
- struct skill_unit *unit;
- struct skill_unit_group *group;
- struct block_list *src;
- int range;
- unsigned int tick;
-
- nullpo_retr(0, bl);
- nullpo_retr(0, ap);
- nullpo_retr(0, src=va_arg(ap,struct block_list*));
- nullpo_retr(0, unit=(struct skill_unit *)src);
- nullpo_retr(0, group=unit->group);
-
- tick=va_arg(ap,unsigned int);
-
- if(!unit->alive || bl->prev==NULL)
- return 0;
-
- range=(unit->range!=0)?unit->range:group->range;
-
- if( range<0 || battle_check_target(src,bl,group->target_flag )<=0 )
- return 0;
- if( bl->x >= src->x-range && bl->x <= src->x+range &&
- bl->y >= src->y-range && bl->y <= src->y+range )
- skill_unit_onplace( unit, bl, tick );
- else
- skill_unit_onout( unit, bl, tick );
return 0;
}
@@ -9269,115 +8642,97 @@ int skill_unit_move_unit_group_sub( struct block_list *bl, va_list ap )
*/
int skill_unit_move_unit_group( struct skill_unit_group *group, int m,int dx,int dy)
{
+ int i,j;
+ int tick = gettick();
+ int *m_flag;
+ struct skill_unit *unit1;
+ struct skill_unit *unit2;
+
nullpo_retr(0, group);
+ if (group->unit_count<=0)
+ return 0;
+ if (group->unit==NULL)
+ return 0;
- if( group->unit_count<=0)
+ // �ړ��”\�ȃX�L���̓_���X�n�ƁA�u���X�g�}�C���A�N���C���A�[�g���b�v�̂�
+ if (!(skill_get_unit_flag(group->skill_id)&UF_DANCE) &&
+ group->skill_id!=HT_CLAYMORETRAP && group->skill_id!=HT_BLASTMINE)
return 0;
- if(group->unit!=NULL){
- if(!battle_config.unit_movement_type){
- int i;
- for(i=0;i<group->unit_count;i++){
- struct skill_unit *unit=&group->unit[i];
- if(unit->alive && !(m==unit->bl.m && dx==0 && dy==0)){
- int range=unit->range;
- map_delblock(&unit->bl);
- unit->bl.m = m;
- unit->bl.x += dx;
- unit->bl.y += dy;
- map_addblock(&unit->bl);
- clif_skill_setunit(unit);
- if(range>0){
- if(range<7)
- range=7;
- map_foreachinarea( skill_unit_move_unit_group_sub, unit->bl.m,
- unit->bl.x-range,unit->bl.y-range,unit->bl.x+range,unit->bl.y+range,0,
- &unit->bl,gettick() );
- }
- }
+ m_flag = malloc(sizeof(int)*group->unit_count);
+ memset(m_flag,0,sizeof(int)*group->unit_count);// �ړ��t���O
+ // ��Ƀt���O��S�����߂�
+ // m_flag
+ // 0: �P���ړ�
+ // 1: ���j�b�g���ړ�����(���ʒu���烆�j�b�g���Ȃ��Ȃ�)
+ // 2: �c�����V�ʒu���ړ���ƂȂ�(�ړ���Ƀ��j�b�g�����݂��Ȃ�)
+ // 3: �c��
+ for(i=0;i<group->unit_count;i++){
+ unit1=&group->unit[i];
+ if (!unit1->alive || unit1->bl.m!=m)
+ continue;
+ for(j=0;j<group->unit_count;j++){
+ unit2=&group->unit[j];
+ if (!unit2->alive)
+ continue;
+ if (unit1->bl.x+dx==unit2->bl.x && unit1->bl.y+dy==unit2->bl.y){
+ // �ړ���Ƀ��j�b�g�����Ԃ��Ă���
+ m_flag[i] |= 0x1;
}
- }else{
- int i,j, *r_flag, *s_flag, *m_flag;
- struct skill_unit *unit1;
- struct skill_unit *unit2;
- r_flag = (int *) aMallocA(sizeof(int) * group->unit_count);
- s_flag = (int *) aMallocA(sizeof(int) * group->unit_count);
- m_flag = (int *) aMallocA(sizeof(int) * group->unit_count);
- memset(r_flag,0, sizeof(int) * group->unit_count);// ?���t���O
- memset(s_flag,0, sizeof(int) * group->unit_count);// ?���t���O
- memset(m_flag,0, sizeof(int) * group->unit_count);// ?���t���O
-
- //��Ƀt���O��S�����߂�
- for(i=0;i<group->unit_count;i++){
- int move_check=0;// ���Ԃ�t���O
- unit1=&group->unit[i];
- for(j=0;j<group->unit_count;j++){
- unit2=&group->unit[j];
- if(unit1->bl.m==m && unit1->bl.x+dx==unit2->bl.x && unit1->bl.y+dy==unit2->bl.y){
- //�ړ���Ƀ��j�b�g�����Ԃ��Ă���
- s_flag[i]=1;// �ړ��O�̃��j�b�g�i���o?��?���t���Oon
- r_flag[j]=1;// ���Ԃ郆�j�b�g�i���o?��?���t���Oon
- move_check=1;//���j�b�g�����Ԃ����B
- break;
- }
- }
- if(!move_check)// ���j�b�g�����Ԃ��ĂȂ�������
- m_flag[i]=1;// �ړ��O���j�b�g�i���o?�̈ړ��t���Oon
- }
-
- //�t���O�Ɋ�Â��ă��j�b�g�ړ�
- for(i=0;i<group->unit_count;i++){
- unit1=&group->unit[i];
- if(m_flag[i]){// �ړ��t���O��on��
- if(!r_flag[i]){// ?���t���O��off�Ȃ�
- //?���ړ�(range��?���̕K�v����)
- int range=unit1->range;
- map_delblock(&unit1->bl);
- unit1->bl.m = m;
- unit1->bl.x += dx;
- unit1->bl.y += dy;
- map_addblock(&unit1->bl);
- clif_skill_setunit(unit1);
- if(range > 0){
- if(range < 7)
- range = 7;
- map_foreachinarea( skill_unit_move_unit_group_sub, unit1->bl.m,
- unit1->bl.x-range,unit1->bl.y-range,unit1->bl.x+range,unit1->bl.y+range,0,
- &unit1->bl,gettick() );
- }
- }else{// ?���t���O��on�Ȃ�
- //�󃆃j�b�g�ɂȂ�̂ŁA?���”\�ȃ��j�b�g��T��
- for(j=0;j<group->unit_count;j++){
- unit2=&group->unit[j];
- if(s_flag[j] && !r_flag[j]){
- // ?���ړ�(range?���t��)
- int range=unit1->range;
- map_delblock(&unit2->bl);
- unit2->bl.m = m;
- unit2->bl.x = unit1->bl.x + dx;
- unit2->bl.y = unit1->bl.y + dy;
- unit2->range = unit1->range;
- map_addblock(&unit2->bl);
- clif_skill_setunit(unit2);
- if(range > 0){
- if(range < 7)
- range = 7;
- map_foreachinarea( skill_unit_move_unit_group_sub, unit2->bl.m,
- unit2->bl.x-range,unit2->bl.y-range,unit2->bl.x+range,unit2->bl.y+range,0,
- &unit2->bl,gettick() );
- }
- s_flag[j]=0;// ?�����������̂�off
- break;
- }
- }
- }
+ if (unit1->bl.x-dx==unit2->bl.x && unit1->bl.y-dy==unit2->bl.y){
+ // ���j�b�g�����̏ꏊ�ɂ���Ă���
+ m_flag[i] |= 0x2;
+ }
+ }
+ }
+ // �t���O�Ɋ�Â��ă��j�b�g�ړ�
+ // �t���O��1��unit��T���A�t���O��2��unit�̈ړ���Ɉڂ�
+ j = 0;
+ for (i=0;i<group->unit_count;i++) {
+ unit1=&group->unit[i];
+ if (!unit1->alive)
+ continue;
+ if (!(m_flag[i]&0x2)) {
+ // ���j�b�g���Ȃ��Ȃ�ꏊ�ŃX�L�����j�b�g�e��������
+ map_foreachinarea(skill_unit_effect,unit1->bl.m,
+ unit1->bl.x,unit1->bl.y,unit1->bl.x,unit1->bl.y,0,
+ &unit1->bl,tick,0);
+ }
+ if (m_flag[i]==0) {
+ // �P���ړ�
+ map_delblock(&unit1->bl);
+ unit1->bl.m = m;
+ unit1->bl.x += dx;
+ unit1->bl.y += dy;
+ map_addblock(&unit1->bl);
+ clif_skill_setunit(unit1);
+ } else if (m_flag[i]==1) {
+ // �t���O��2�̂��̂�T���Ă��̃��j�b�g�̈ړ���Ɉړ�
+ for(;j<group->unit_count;j++) {
+ if (m_flag[j]==2) {
+ // �p���ړ�
+ unit2 = &group->unit[j];
+ if (!unit2->alive)
+ continue;
+ map_delblock(&unit1->bl);
+ unit1->bl.m = m;
+ unit1->bl.x = unit2->bl.x+dx;
+ unit1->bl.y = unit2->bl.y+dy;
+ map_addblock(&unit1->bl);
+ clif_skill_setunit(unit1);
+ j++;
+ break;
}
}
- aFree(r_flag);
- aFree(s_flag);
- aFree(m_flag);
+ }
+ if (!(m_flag[i]&0x2)) {
+ // �ړ���̏ꏊ�ŃX�L�����j�b�g�𔭓�
+ map_foreachinarea(skill_unit_effect,unit1->bl.m,
+ unit1->bl.x,unit1->bl.y,unit1->bl.x,unit1->bl.y,0,
+ &unit1->bl,tick,1);
}
}
+ free(m_flag);
return 0;
}
@@ -9505,25 +8860,29 @@ int skill_produce_mix( struct map_session_data *sd,
if(!equip) {
// Corrected rates [DracoRPG] --------------------------//
if(skill_produce_db[idx].req_skill==AM_PHARMACY) {
+ make_per = pc_checkskill(sd,AM_LEARNINGPOTION)*100
+ + pc_checkskill(sd,AM_PHARMACY)*300 + sd->status.job_level*20
+ + sd->status.dex*10+sd->status.int_*5;
+
if(nameid >= 501 && nameid <= 505) // Normal potions
- make_per = 2000 + sd->status.job_level*20 + sd->paramc[4]*10 + sd->paramc[5]*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300 + pc_checkskill(sd,AM_POTIONPITCHER)*100;
- if(nameid >= 605 && nameid <= 606) // Anodyne & Aloevera (not sure of the formula, I put the same base value as normal pots but without the Aid Potion bonus since they are not throwable pots ^^)
- make_per = 2000 + sd->status.job_level*20 + sd->paramc[4]*10 + sd->paramc[5]*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300;
+ make_per += 2000 + pc_checkskill(sd,AM_POTIONPITCHER)*100;
+ else if(nameid >= 605 && nameid <= 606) // Anodyne & Aloevera (not sure of the formula, I put the same base value as normal pots but without the Aid Potion bonus since they are not throwable pots ^^)
+ make_per += 2000;
else if(nameid >= 545 && nameid <= 547) // Concentrated potions
- make_per = sd->status.job_level*20 + sd->paramc[4]*10 + sd->paramc[5]*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300;
+ ;
else if(nameid == 970) // Alcohol
- make_per = 1000 + sd->status.job_level*20 + sd->paramc[4]*10 + sd->paramc[5]*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300;
+ make_per += 1000;
else if(nameid == 7135) // Bottle Grenade
- make_per = 500 + sd->status.job_level*20 + sd->paramc[4]*10 + sd->paramc[5]*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300 + pc_checkskill(sd,AM_DEMONSTRATION)*100;
+ make_per += 500 + pc_checkskill(sd,AM_DEMONSTRATION)*100;
else if(nameid == 7136) // Acid Bottle
- make_per = 500 + sd->status.job_level*20 + sd->paramc[4]*10 + sd->paramc[5]*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300 + pc_checkskill(sd,AM_ACIDTERROR)*100;
+ make_per += 500 + pc_checkskill(sd,AM_ACIDTERROR)*100;
else if(nameid == 7137) // Plant Bottle
- make_per = 500 + sd->status.job_level*20 + sd->paramc[4]*10 + sd->paramc[5]*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300 + pc_checkskill(sd,AM_CANNIBALIZE)*100;
+ make_per += 500 + pc_checkskill(sd,AM_CANNIBALIZE)*100;
else if(nameid == 7138) // Marine Sphere Bottle
- make_per = 500 + sd->status.job_level*20 + sd->paramc[4]*10 + sd->paramc[5]*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300 + pc_checkskill(sd,AM_SPHEREMINE)*100;
+ make_per += 500 + pc_checkskill(sd,AM_SPHEREMINE)*100;
else if(nameid == 7139) // Glistening Coat
- make_per = 500 + sd->status.job_level*20 + sd->paramc[4]*10 + sd->paramc[5]*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300 + pc_checkskill(sd,AM_CP_WEAPON)*100 +
- pc_checkskill(sd,AM_CP_SHIELD)*100 + pc_checkskill(sd,AM_CP_ARMOR)*100 + pc_checkskill(sd,AM_CP_HELM)*100;
+ make_per += 500 + pc_checkskill(sd,AM_CP_WEAPON)*100 + pc_checkskill(sd,AM_CP_SHIELD)*100 +
+ pc_checkskill(sd,AM_CP_ARMOR)*100 + pc_checkskill(sd,AM_CP_HELM)*100;
else
make_per = 1000 + sd->status.base_level*30 + sd->paramc[3]*20 + sd->paramc[4]*15 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300;
} else if (skill_produce_db[idx].req_skill == ASC_CDP) {
@@ -9604,8 +8963,7 @@ int skill_produce_mix( struct map_session_data *sd,
clif_additem(sd,0,0,flag);
map_addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
}
- }
- else {
+ } else {
if(log_config.produce > 0)
log_produce(sd,nameid,slot1,slot2,slot3,0);
@@ -9675,6 +9033,213 @@ int skill_arrow_create( struct map_session_data *sd,int nameid)
* �������n
*/
+/*----------------------------------------------------------------------------
+ * �������n
+ */
+
+/*
+ * �����񏈗�
+ * ',' �ŋ�؂��� val �ɖ߂�
+ */
+int skill_split_str(char *str,char **val,int num)
+{
+ int i;
+
+ for (i=0; i<num && str; i++){
+ val[i] = str;
+ str = strchr(str,',');
+ if (str)
+ *str++=0;
+ }
+ return i;
+}
+/*
+ * �����񏈗�
+ * ':' �ŋ�؂���atoi����val�ɖ߂�
+ */
+int skill_split_atoi(char *str,int *val)
+{
+ int i, max = 0;
+
+ for (i=0; i<MAX_SKILL_LEVEL; i++) {
+ if (str) {
+ val[i] = max = atoi(str);
+ str = strchr(str,':');
+ if (str)
+ *str++=0;
+ } else {
+ val[i] = max;
+ }
+ }
+ return i;
+}
+
+/*
+ * �X�L�����j�b�g�̔z�u���쐬
+ */
+void skill_init_unit_layout()
+{
+ int i,j,size,pos = 0;
+
+ memset(skill_unit_layout,0,sizeof(skill_unit_layout));
+ // ��`�̃��j�b�g�z�u���쐬����
+ for (i=0; i<=MAX_SQUARE_LAYOUT; i++) {
+ size = i*2+1;
+ skill_unit_layout[i].count = size*size;
+ for (j=0; j<size*size; j++) {
+ skill_unit_layout[i].dx[j] = (j%size-i);
+ skill_unit_layout[i].dy[j] = (j/size-i);
+ }
+ }
+ pos = i;
+ // ��`�ȊO�̃��j�b�g�z�u���쐬����
+ for (i=0;i<MAX_SKILL_DB;i++) {
+ if (!skill_db[i].unit_id[0] || skill_db[i].unit_layout_type[0] != -1)
+ continue;
+ switch (i) {
+ case MG_FIREWALL:
+ case WZ_ICEWALL:
+ // �t�@�C�A�[�E�H�[���A�A�C�X�E�H�[���͕����ŕς��̂ŕʏ���
+ break;
+ case PR_SANCTUARY:
+ {
+ static const int dx[] = {
+ -1, 0, 1,-2,-1, 0, 1, 2,-2,-1,
+ 0, 1, 2,-2,-1, 0, 1, 2,-1, 0, 1};
+ static const int dy[]={
+ -2,-2,-2,-1,-1,-1,-1,-1, 0, 0,
+ 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2};
+ skill_unit_layout[pos].count = 21;
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ break;
+ }
+ case PR_MAGNUS:
+ {
+ static const int dx[] = {
+ -1, 0, 1,-1, 0, 1,-3,-2,-1, 0,
+ 1, 2, 3,-3,-2,-1, 0, 1, 2, 3,
+ -3,-2,-1, 0, 1, 2, 3,-1, 0, 1,-1, 0, 1};
+ static const int dy[] = {
+ -3,-3,-3,-2,-2,-2,-1,-1,-1,-1,
+ -1,-1,-1, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3};
+ skill_unit_layout[pos].count = 33;
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ break;
+ }
+ case AS_VENOMDUST:
+ {
+ static const int dx[] = {-1, 0, 0, 0, 1};
+ static const int dy[] = { 0,-1, 0, 1, 0};
+ skill_unit_layout[pos].count = 5;
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ break;
+ }
+ case CR_GRANDCROSS:
+ case NPC_DARKGRANDCROSS:
+ {
+ static const int dx[] = {
+ 0, 0,-1, 0, 1,-2,-1, 0, 1, 2,
+ -4,-3,-2,-1, 0, 1, 2, 3, 4,-2,
+ -1, 0, 1, 2,-1, 0, 1, 0, 0};
+ static const int dy[] = {
+ -4,-3,-2,-2,-2,-1,-1,-1,-1,-1,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
+ 1, 1, 1, 1, 2, 2, 2, 3, 4};
+ skill_unit_layout[pos].count = 29;
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ break;
+ }
+ case PF_FOGWALL:
+ {
+ static const int dx[] = {
+ -2,-1, 0, 1, 2,-2,-1, 0, 1, 2,-2,-1, 0, 1, 2};
+ static const int dy[] = {
+ -1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1};
+ skill_unit_layout[pos].count = 15;
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ break;
+ }
+ default:
+ printf("unknown unit layout at skill %d\n",i);
+ break;
+ }
+ if (!skill_unit_layout[pos].count)
+ continue;
+ for (j=0;j<MAX_SKILL_LEVEL;j++)
+ skill_db[i].unit_layout_type[j] = pos;
+ pos++;
+ }
+ // �t�@�C���[�E�H�[��
+ firewall_unit_pos = pos;
+ for (i=0;i<8;i++) {
+ if (i&1) { /* �΂ߔz�u */
+ skill_unit_layout[pos].count = 5;
+ if (i&0x2) {
+ int dx[] = {-1,-1, 0, 0, 1};
+ int dy[] = { 1, 0, 0,-1,-1};
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ } else {
+ int dx[] = { 1, 1 ,0, 0,-1};
+ int dy[] = { 1, 0, 0,-1,-1};
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ }
+ } else { /* �c���z�u */
+ skill_unit_layout[pos].count = 3;
+ if (i%4==0) { /* �㉺ */
+ int dx[] = {-1, 0, 1};
+ int dy[] = { 0, 0, 0};
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ } else { /* ���E */
+ int dx[] = { 0, 0, 0};
+ int dy[] = {-1, 0, 1};
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ }
+ }
+ pos++;
+ }
+ // �A�C�X�E�H�[��
+ icewall_unit_pos = pos;
+ for (i=0;i<8;i++) {
+ skill_unit_layout[pos].count = 5;
+ if (i&1) { /* �΂ߔz�u */
+ if (i&0x2) {
+ int dx[] = {-2,-1, 0, 1, 2};
+ int dy[] = { 2,-1, 0,-1,-2};
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ } else {
+ int dx[] = { 2, 1 ,0,-1,-2};
+ int dy[] = { 2, 1, 0,-1,-2};
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ }
+ } else { /* �c���z�u */
+ if (i%4==0) { /* �㉺ */
+ int dx[] = {-2,-1, 0, 1, 2};
+ int dy[] = { 0, 0, 0, 0, 0};
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ } else { /* ���E */
+ int dx[] = { 0, 0, 0, 0, 0};
+ int dy[] = {-2,-1, 0, 1, 2};
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ }
+ }
+ pos++;
+ }
+}
+
/*==========================================
* �X�L��?�W�t�@�C��?��?��
* skill_db.txt �X�L���f?�^
@@ -9699,14 +9264,10 @@ int skill_readdb(void)
return 1;
}
while(fgets(line,1020,fp)){
- char *split[50], *split2[MAX_SKILL_LEVEL];
+ char *split[50];
if(line[0]=='/' && line[1]=='/')
continue;
- for(j=0,p=line;j<14 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
+ j = skill_split_str(line,split,14);
if(split[13]==NULL || j<14)
continue;
@@ -9717,28 +9278,13 @@ int skill_readdb(void)
continue;
/* printf("skill id=%d\n",i); */
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[1];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].range[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
+ skill_split_atoi(split[1],skill_db[i].range);
skill_db[i].hit=atoi(split[2]);
skill_db[i].inf=atoi(split[3]);
skill_db[i].pl=atoi(split[4]);
skill_db[i].nk=atoi(split[5]);
skill_db[i].max=atoi(split[6]);
-
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[7];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].num[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
+ skill_split_atoi(split[1],skill_db[i].num);
if(strcmpi(split[8],"yes") == 0)
skill_db[i].castcancel=1;
@@ -9755,14 +9301,7 @@ int skill_readdb(void)
skill_db[i].skill_type=BF_MISC;
else
skill_db[i].skill_type=0;
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[13];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].blewcount[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
+ skill_split_atoi(split[13],skill_db[i].blewcount);
}
fclose(fp);
sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/skill_db.txt");
@@ -9774,14 +9313,10 @@ int skill_readdb(void)
return 1;
}
while(fgets(line,1020,fp)){
- char *split[51], *split2[MAX_SKILL_LEVEL];
+ char *split[50];
if(line[0]=='/' && line[1]=='/')
continue;
- for(j=0,p=line;j<30 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
+ j = skill_split_str(line,split,30);
if(split[29]==NULL || j<30)
continue;
@@ -9791,74 +9326,26 @@ int skill_readdb(void)
else if(i<=0 || i>MAX_SKILL_DB)
continue;
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[1];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].hp[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
-
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[2];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].mhp[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
-
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[3];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].sp[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
-
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[4];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].hp_rate[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
-
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[5];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].sp_rate[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
-
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[6];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].zeny[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
-
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[7];j<32 && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<32 && split2[k];k++) {
- l = atoi(split2[k]);
- if(l == 99) {
+ skill_split_atoi(split[1],skill_db[i].hp);
+ skill_split_atoi(split[2],skill_db[i].mhp);
+ skill_split_atoi(split[3],skill_db[i].sp);
+ skill_split_atoi(split[4],skill_db[i].hp_rate);
+ skill_split_atoi(split[5],skill_db[i].sp_rate);
+ skill_split_atoi(split[6],skill_db[i].zeny);
+
+ p = split[7];
+ for(j=0;j<32;j++){
+ l = atoi(p);
+ if (l==99) {
skill_db[i].weapon = 0xffffffff;
break;
}
else
skill_db[i].weapon |= 1<<l;
+ p=strchr(p,':');
+ if(!p)
+ break;
+ p++;
}
if( strcmpi(split[8],"hiding")==0 ) skill_db[i].state=ST_HIDING;
@@ -9875,14 +9362,7 @@ int skill_readdb(void)
else if( strcmpi(split[8],"water")==0 ) skill_db[i].state=ST_WATER;
else skill_db[i].state=ST_NONE;
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[9];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].spiritball[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
+ skill_split_atoi(split[9],skill_db[i].spiritball);
skill_db[i].itemid[0]=atoi(split[10]);
skill_db[i].amount[0]=atoi(split[11]);
skill_db[i].itemid[1]=atoi(split[12]);
@@ -9915,15 +9395,11 @@ int skill_readdb(void)
return 1;
}
while(fgets(line,1020,fp)){
- char *split[50], *split2[MAX_SKILL_LEVEL];
+ char *split[50];
memset(split,0,sizeof(split)); // [Valaris] thanks to fov
if(line[0]=='/' && line[1]=='/')
continue;
- for(j=0,p=line;j<5 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
+ j = skill_split_str(line,split,5);
if(split[4]==NULL || j<5)
continue;
@@ -9933,45 +9409,55 @@ int skill_readdb(void)
else if(i<=0 || i>MAX_SKILL_DB)
continue;
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[1];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].cast[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
-
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[2];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].delay[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
+ skill_split_atoi(split[1],skill_db[i].cast);
+ skill_split_atoi(split[2],skill_db[i].delay);
+ skill_split_atoi(split[3],skill_db[i].upkeep_time);
+ skill_split_atoi(split[4],skill_db[i].upkeep_time2);
+ }
+ fclose(fp);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/skill_cast_db.txt");
+ ShowStatus(tmp_output);
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[3];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].upkeep_time[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
+ /* �X�L�����j�b�g�f�[�^�x�[�X */
+ fp = fopen("db/skill_unit_db.txt","r");
+ if (fp==NULL) {
+ printf("can't read db/skill_unit_db.txt\n");
+ return 1;
+ }
+ while (fgets(line,1020,fp)) {
+ char *split[50];
+ if (line[0]=='/' && line[1]=='/')
+ continue;
+ j = skill_split_str(line,split,8);
+ if (split[7]==NULL || j<8)
+ continue;
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[4];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].upkeep_time2[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
+ i=atoi(split[0]);
+ if (i>=10000 && i<10015) // for guild skills [Celest]
+ i -= 9500;
+ else if(i<=0 || i>MAX_SKILL_DB)
+ continue;
+ skill_db[i].unit_id[0] = strtol(split[1],NULL,16);
+ skill_db[i].unit_id[1] = strtol(split[2],NULL,16);
+ skill_split_atoi(split[3],skill_db[i].unit_layout_type);
+ skill_db[i].unit_range = atoi(split[4]);
+ skill_db[i].unit_interval = atoi(split[5]);
+
+ if( strcmpi(split[6],"noenemy")==0 ) skill_db[i].unit_target=BCT_NOENEMY;
+ else if( strcmpi(split[6],"friend")==0 ) skill_db[i].unit_target=BCT_NOENEMY;
+ else if( strcmpi(split[6],"party")==0 ) skill_db[i].unit_target=BCT_PARTY;
+ else if( strcmpi(split[6],"all")==0 ) skill_db[i].unit_target=BCT_ALL;
+ else if( strcmpi(split[6],"enemy")==0 ) skill_db[i].unit_target=BCT_ENEMY;
+ else if( strcmpi(split[6],"self")==0 ) skill_db[i].unit_target=BCT_SELF;
+ else skill_db[i].unit_target = strtol(split[6],NULL,16);
+
+ skill_db[i].unit_flag = strtol(split[7],NULL,16);
+ k++;
}
fclose(fp);
- sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/skill_cast_db.txt");
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/skill_unit_db.txt");
ShowStatus(tmp_output);
+ skill_init_unit_layout();
/* �����n�X�L���f?�^�x?�X */
memset(skill_produce_db,0,sizeof(skill_produce_db));
@@ -9990,16 +9476,11 @@ int skill_readdb(void)
if(line[0]=='/' && line[1]=='/')
continue;
memset(split,0,sizeof(split));
- for(j=0,p=line;j<3 + MAX_PRODUCE_RESOURCE * 2 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
+ j = skill_split_str(line,split,(3 + MAX_PRODUCE_RESOURCE * 2));
if(split[0]==0) //fixed by Lupus
continue;
i=atoi(split[0]);
- if(i<=0)
- continue;
+ if(i<=0) continue;
skill_produce_db[k].nameid=i;
skill_produce_db[k].itemlv=atoi(split[1]);
@@ -10031,11 +9512,7 @@ int skill_readdb(void)
if(line[0]=='/' && line[1]=='/')
continue;
memset(split,0,sizeof(split));
- for(j=0,p=line;j<13 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
+ j = skill_split_str(line,split,13);
if(split[0]==0) //fixed by Lupus
continue;
i=atoi(split[0]);
@@ -10068,11 +9545,7 @@ int skill_readdb(void)
if(line[0]=='/' && line[1]=='/')
continue;
memset(split,0,sizeof(split));
- for(j=0,p=line;j<13 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
+ j = skill_split_str(line,split,13);
if(split[0]==0) //fixed by Lupus
continue;
i=atoi(split[0]);
@@ -10096,15 +9569,11 @@ int skill_readdb(void)
return 1;
}
while(fgets(line,1020,fp)){
- char *split[50], *split2[MAX_SKILL_LEVEL];
+ char *split[50];
if(line[0]=='/' && line[1]=='/')
continue;
memset(split,0,sizeof(split));
- for(j=0,p=line;j<3 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
+ j = skill_split_str(line,split,3);
if(split[0]==0) //fixed by Lupus
continue;
i=atoi(split[0]);
@@ -10113,25 +9582,10 @@ int skill_readdb(void)
else if(i<=0 || i>MAX_SKILL_DB)
continue;
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[1];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].castnodex[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
-
+ skill_split_atoi(split[1],skill_db[i].castnodex);
if (!split[2])
continue;
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[2];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].delaynodex[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
+ skill_split_atoi(split[2],skill_db[i].delaynodex);
}
fclose(fp);
sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/skill_castnodex_db.txt");
@@ -10148,11 +9602,7 @@ int skill_readdb(void)
if(line[0]=='/' && line[1]=='/')
continue;
memset(split,0,sizeof(split));
- for(j=0,p=line;j<2 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
+ j = skill_split_str(line,split,2);
if(split[0]==0) //fixed by Lupus
continue;
i=atoi(split[0]);
diff --git a/src/map/skill.h b/src/map/skill.h
index dc789aa4a..72653e9a9 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -25,6 +25,12 @@ struct skill_db {
int castnodex[MAX_SKILL_LEVEL];
int delaynodex[MAX_SKILL_LEVEL];
int nocast;
+ int unit_id[2];
+ int unit_layout_type[MAX_SKILL_LEVEL];
+ int unit_range;
+ int unit_interval;
+ int unit_target;
+ int unit_flag;
};
extern struct skill_db skill_db[MAX_SKILL_DB];
@@ -35,6 +41,24 @@ struct skill_name_db {
};
extern const struct skill_name_db skill_names[];
+#define MAX_SKILL_UNIT_LAYOUT 50
+#define MAX_SQUARE_LAYOUT 5 // 11*11�̃��j�b�g�z�u���ő�
+#define MAX_SKILL_UNIT_COUNT ((MAX_SQUARE_LAYOUT*2+1)*(MAX_SQUARE_LAYOUT*2+1))
+struct skill_unit_layout {
+ int count;
+ int dx[MAX_SKILL_UNIT_COUNT];
+ int dy[MAX_SKILL_UNIT_COUNT];
+};
+
+enum {
+ UF_DEFNOTENEMY = 0x0001, // defnotenemy �ݒ��BCT_NOENEMY�ɐ؂�ւ�
+ UF_NOREITERATION = 0x0002, // �d���u���֎~
+ UF_NOFOOTSET = 0x0004, // �����u���֎~
+ UF_NOOVERLAP = 0x0008, // ���j�b�g���ʂ��d�����Ȃ�
+ UF_DANCE = 0x0100, // �_���X�X�L��
+ UF_ENSEMBLE = 0x0200, // ���t�X�L��
+};
+
// �A�C�e���쐬�f?�^�x?�X
struct skill_produce_db {
int nameid, trigger;
@@ -87,6 +111,7 @@ int skill_get_unit_id(int id,int flag);
int skill_get_inf2( int id );
int skill_get_maxcount( int id );
int skill_get_blewcount( int id ,int lv );
+int skill_get_unit_flag( int id );
int skill_tree_get_max( int id, int b_class ); // Celest
// �X�L���̎g�p
@@ -110,10 +135,6 @@ int skill_delunit(struct skill_unit *unit);
struct skill_unit_group *skill_initunitgroup(struct block_list *src,
int count,int skillid,int skilllv,int unit_id);
int skill_delunitgroup(struct skill_unit_group *group);
-
-struct skill_unit_group_tickset *skill_unitgrouptickset_search(struct block_list *bl,struct skill_unit_group *sg);
-int skill_unitgrouptickset_delete(struct block_list *bl,struct skill_unit_group *sg);
-
int skill_clear_unitgroup(struct block_list *src);
int skill_unit_ondamaged(struct skill_unit *src,struct block_list *bl,
@@ -121,12 +142,12 @@ int skill_unit_ondamaged(struct skill_unit *src,struct block_list *bl,
int skill_castfix( struct block_list *bl, int time );
int skill_delayfix( struct block_list *bl, int time );
-int skill_check_unit_range(int m,int x,int y,int range,int skillid);
-int skill_check_unit_range2(int m,int x,int y,int range);
+int skill_check_unit_range(int m,int x,int y,int skillid, int skilllv);
+int skill_check_unit_range2(int m,int x,int y,int skillid, int skilllv);
// -- moonsoul (added skill_check_unit_cell)
int skill_check_unit_cell(int skillid,int m,int x,int y,int unit_id);
int skill_unit_out_all( struct block_list *bl,unsigned int tick,int range);
-int skill_unit_move( struct block_list *bl,unsigned int tick,int range);
+int skill_unit_move(struct block_list *bl,unsigned int tick,int flag);
int skill_unit_move_unit_group( struct skill_unit_group *group, int m,int dx,int dy);
struct skill_unit_group *skill_check_dancing( struct block_list *src );
@@ -151,7 +172,6 @@ void skill_devotion_end(struct map_session_data *md,struct map_session_data *sd,
// ���̑�
int skill_check_cloaking(struct block_list *bl);
int skill_type_cloaking(struct block_list *bl);
-int skill_is_danceskill(int id);
// �X�e?�^�X�ُ�
int skill_encchant_eremental_end(struct block_list *bl, int type);
diff --git a/src/map/status.c b/src/map/status.c
index 0d35572d0..5275be42a 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -31,14 +31,17 @@ int SkillStatusChangeTable[]={ /* status.h��enum��SC_***�Ƃ��킹�邱�� */
-1, 1,-1,
/* 10- */
SC_SIGHT, /* �T�C�g */
- -1,-1,-1,-1,
+ -1,
+ SC_SAFETYWALL, /* �Z�[�t�e�B�[�E�H�[�� */
+ -1,-1,-1,
SC_FREEZE, /* �t���X�g�_�C�o? */
SC_STONE, /* �X�g?���J?�X */
-1,-1,-1,
/* 20- */
-1,-1,-1,-1,
SC_RUWACH, /* ���A�t */
- -1,-1,-1,-1,
+ SC_PNEUMA, /* �j���[�} */
+ -1,-1,-1,
SC_INCREASEAGI, /* ���x?�� */
/* 30- */
SC_DECREASEAGI, /* ���x���� */
@@ -3585,15 +3588,6 @@ int status_change_start(struct block_list *bl,int type,int val1,int val2,int val
case SC_ANKLE:
break;
- /* �E�H?�^?�{?�� */
- case SC_WATERBALL:
- tick=150;
- if(val1>5) //���x����5�ȏ�̏ꍇ��25?�ɐ���(1?�ڂ͂��łɑł��Ă�̂�-1)
- val3=5*5-1;
- else
- val3= (val1|1)*(val1|1)-1;
- break;
-
/* �X�L������Ȃ�/���Ԃ�?�W���Ȃ� */
case SC_RIDING:
calc_flag = 1;
@@ -4361,21 +4355,6 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
}
break;
- case SC_WATERBALL: /* �E�H?�^?�{?�� */
- {
- struct block_list *target=map_id2bl(sc_data[type].val2);
- if (!target || !target->prev)
- break; // target has been killed in previous hits, no need to raise an alarm ^^;
- // nullpo_retb(target);
- // nullpo_retb(target->prev);
- skill_attack(BF_MAGIC,bl,bl,target,WZ_WATERBALL,sc_data[type].val1,tick,0);
- if((--sc_data[type].val3)>0) {
- sc_data[type].timer=add_timer( 150+tick,status_change_timer, bl->id, data );
- return 0;
- }
- }
- break;
-
case SC_ENDURE: /* �C���f���A */
case SC_AUTOBERSERK: // Celest
if(sd && sd->special_state.infinite_endure) {
diff --git a/src/map/status.h b/src/map/status.h
index d788c7b50..fbeee7300 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -111,7 +111,7 @@ enum { // struct map_session_data �� status_change�̔�?�e?�u��
//-- 137-139
SC_SAFETYWALL = 140,
SC_PNEUMA = 141,
- SC_WATERBALL = 142,
+//-- 142
SC_ANKLE = 143,
SC_DANCING = 144,
SC_KEEPING = 145,
diff --git a/src/txt-converter/char/Makefile b/src/txt-converter/char/Makefile
index a4cca87fd..6b85a04db 100644
--- a/src/txt-converter/char/Makefile
+++ b/src/txt-converter/char/Makefile
@@ -1,7 +1,7 @@
all: char-converter
sql: char-converter
-COMMON_OBJ = ../../common/core.o ../../common/socket.o ../../common/timer.o ../../common/grfio.o ../../common/db.o ../../common/lock.o ../../common/nullpo.o ../../common/malloc.o ../../common/showmsg.o ../../common/strlib.o
+COMMON_OBJ = ../../common/obj/core.o ../../common/obj/socket.o ../../common/obj/timer.o ../../common/obj/grfio.o ../../common/obj/db.o ../../common/obj/lock.o ../../common/obj/nullpo.o ../../common/obj/malloc.o ../../common/obj/showmsg.o ../../common/obj/strlib.o
char-converter: char-converter.o $(COMMON_OBJ)
$(CC) -o ../../../$@ $^ $(LIB_S)
diff --git a/src/txt-converter/login/Makefile b/src/txt-converter/login/Makefile
index 56b97e772..7158931d0 100644
--- a/src/txt-converter/login/Makefile
+++ b/src/txt-converter/login/Makefile
@@ -1,7 +1,7 @@
all: login-converter
sql: login-converter
-COMMON_OBJ = ../../common/core.o ../../common/socket.o ../../common/timer.o ../../common/grfio.o ../../common/db.o ../../common/lock.o ../../common/nullpo.o ../../common/malloc.o ../../common/showmsg.o ../../common/strlib.o
+COMMON_OBJ = ../../common/obj/core.o ../../common/obj/socket.o ../../common/obj/timer.o ../../common/obj/grfio.o ../../common/obj/db.o ../../common/obj/lock.o ../../common/obj/nullpo.o ../../common/obj/malloc.o ../../common/obj/showmsg.o ../../common/obj/strlib.o
COMMON_H = ../../common/core.h ../../common/socket.h ../../common/timer.h ../../common/mmo.h ../../common/version.h ../../common/db.h ../../common/malloc.h ../../common/strlib.h