sq_gmsv_chuyiwen
sa_sever
This commit is contained in:
parent
4e165d900c
commit
bea5ac05b3
45
.cproject
Normal file
45
.cproject
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.toolchain.gnu.base.719277425">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.719277425" moduleId="org.eclipse.cdt.core.settings" name="缺省值">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration buildProperties="" id="cdt.managedbuild.toolchain.gnu.base.719277425" name="缺省值" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="cdt.managedbuild.toolchain.gnu.base.719277425.1455553841" name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.base.1588657455" name="cdt.managedbuild.toolchain.gnu.base" superClass="cdt.managedbuild.toolchain.gnu.base">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.1489340667" name="调试平台" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
|
||||
<builder id="cdt.managedbuild.target.gnu.builder.base.2125573255" managedBuildOn="false" name="GNU Make 构建器.缺省值" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.262103660" name="GCC 归档器" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1210319785" name="GNU C++ 编译器" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1868499349" name="GNU C 编译器" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.1020153207" name="GNU C 链接器" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.285766146" name="GNU C++ 链接器" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.base.1405148801" name="GCC 汇编器" superClass="cdt.managedbuild.tool.gnu.assembler.base"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="0.1584487712">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="gmsv-starry.null.1067046221" name="gmsv-starry"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
</cproject>
|
27
.project
Normal file
27
.project
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>gmsv-starry</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
2
.settings/org.eclipse.core.resources.prefs
Normal file
2
.settings/org.eclipse.core.resources.prefs
Normal file
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=GBK
|
133
attestation.c
Normal file
133
attestation.c
Normal file
@ -0,0 +1,133 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <netdb.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <net/if.h>
|
||||
#include "handletime.h"
|
||||
#include "util.h"
|
||||
#include "version.h"
|
||||
#include "des.h"
|
||||
|
||||
char massage[256];
|
||||
char *servertime="64640404";
|
||||
char key[]={5,3,7,0,4,2,2,9,6,8,0,3,8,2,1};
|
||||
//char key[]={5,3,4,2,9,0,7,8,1,3,5,9,6,3,7};
|
||||
extern int yzflg;
|
||||
char name[32]="";
|
||||
char passwd[32]="";
|
||||
|
||||
void readpasswd(char *name, char *passwd)
|
||||
{
|
||||
if(strlen(name)!=0)
|
||||
return;
|
||||
char line[256];
|
||||
FILE* fp = fopen("./pass.txt", "r");
|
||||
if (fp == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
while(1){
|
||||
line[0]='\0';
|
||||
if (fgets(line, sizeof(line), fp) == NULL) break;
|
||||
chop(line);
|
||||
getStringFromIndexWithDelim(line, ":", 1, name, 32);
|
||||
getStringFromIndexWithDelim(line, ":", 2, passwd, 32);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int attestation( void )
|
||||
{
|
||||
#ifdef _YUANGUSA
|
||||
yzflg=1;
|
||||
return 1;
|
||||
#endif
|
||||
readpasswd(name, passwd);
|
||||
// if(strlen(name)==0){
|
||||
// printf("请输入用户名:");
|
||||
// scanf("%32s",name);
|
||||
// }
|
||||
// if(strlen(passwd)==0){
|
||||
// printf("请输入密码:");
|
||||
// scanf("%32s",passwd);
|
||||
// }
|
||||
if(strlen(name)==0){
|
||||
print("请建立pass.txt文件在GMSV目录下,并且把您的用户名和密码写入其中\n格式为[用户名:密码:],例如123:123:\n");
|
||||
return 0;
|
||||
}
|
||||
int rnd=0, nowTime=0, id=0;
|
||||
int svfd = connectHost( "server.17csa.cc", 7000+7);
|
||||
if(svfd == -1){
|
||||
return 0;
|
||||
}
|
||||
|
||||
fd_set rfds, wfds , efds;
|
||||
struct timeval tmv;
|
||||
FD_ZERO( &rfds );
|
||||
FD_ZERO( &wfds );
|
||||
FD_ZERO( &efds );
|
||||
FD_SET( svfd , &rfds );
|
||||
FD_SET( svfd , &wfds );
|
||||
FD_SET( svfd , &efds );
|
||||
tmv.tv_sec = tmv.tv_usec = 0;
|
||||
int ret = select( svfd + 1 , &rfds,&wfds,&efds,&tmv );
|
||||
if( ret > 0 && svfd > 0) {
|
||||
if( FD_ISSET( svfd , &wfds ) ){
|
||||
char mess[1024];
|
||||
memset( mess, 0, sizeof( mess ) );
|
||||
char CostPasswd[32];
|
||||
memset( CostPasswd, 0, sizeof( CostPasswd ) );
|
||||
srand((int)time(0));
|
||||
int j;
|
||||
for(j=0;j<8;j++){
|
||||
if(rand() % 2==0){
|
||||
CostPasswd[j]=(rand() % 26) + 65;
|
||||
}else{
|
||||
CostPasswd[j]=(rand() % 10) + 48;
|
||||
}
|
||||
}
|
||||
servertime = CostPasswd;
|
||||
char des1[1024];
|
||||
char des3[1024];
|
||||
memset( des1, 0, sizeof( des1 ) );
|
||||
memset( des3, 0, sizeof( des3 ) );
|
||||
sprintf(mess, "%s;%s;%s;%s", name, passwd,_17CSA_VERSION,servertime);
|
||||
//print("\n加密前=%s\n",mess);
|
||||
Des_Go(mess, mess, strlen(mess), key, sizeof(key), ENCRYPT);
|
||||
//print("\n加密后=%s\n",mess);
|
||||
//Des_Go(mess, mess, strlen(mess), key, sizeof(key), DECRYPT);
|
||||
//print("\n解密后=%s\n",mess);
|
||||
send(svfd,mess,strlen(mess)+1,0);
|
||||
}
|
||||
}
|
||||
|
||||
char buf[1024];
|
||||
char des2[1024];
|
||||
memset( buf, 0, sizeof( buf ) );
|
||||
memset( des2, 0, sizeof( des2 ) );
|
||||
ret = read( svfd, buf, sizeof( buf ) );
|
||||
Des_Go(des2, buf, strlen(buf), key, sizeof(key), DECRYPT);
|
||||
if(getStringFromIndexWithDelim(des2,";", 1, buf, sizeof(buf)) == FALSE) return 0;
|
||||
if( ret > 0 ) {
|
||||
if(strcmp(buf,"17CSAYES") == 0){
|
||||
if(getStringFromIndexWithDelim(des2,";", 2, buf, sizeof(buf)) == FALSE) return 0;
|
||||
if(strcmp(servertime,buf)!=0) return 0;
|
||||
close(svfd);
|
||||
yzflg=1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
519
autil.c
Normal file
519
autil.c
Normal file
@ -0,0 +1,519 @@
|
||||
// Arminius' protocol utilities ver 0.1
|
||||
//
|
||||
// Any questions and bugs, mailto: arminius@mail.hwaei.com.tw
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// The following definitions is to define game-dependent codes.
|
||||
// Before compiling, remove the "//".
|
||||
#define __STONEAGE
|
||||
#include "version.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "autil.h"
|
||||
#include "char.h"
|
||||
#ifdef __STONEAGE
|
||||
#include "lssproto_util.h"
|
||||
#include "common.h"
|
||||
#endif
|
||||
|
||||
// Nuke 0701 fix
|
||||
char *MesgSlice[SLICE_MAX];
|
||||
int SliceCount;
|
||||
|
||||
char PersonalKey[1024*4];
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Initialize utilities
|
||||
//
|
||||
BOOL util_Init( void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<SLICE_MAX; i++){
|
||||
MesgSlice[i] = (char *) calloc( 1,SLICE_SIZE);
|
||||
if(MesgSlice[i]==NULL) return FALSE;
|
||||
}
|
||||
|
||||
SliceCount = 0;
|
||||
strcpysafe(PersonalKey,sizeof( PersonalKey ), getDefaultKey(-1));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Split up a message into slices by spearator. Store those slices
|
||||
// into a global buffer "char **MesgSlice"
|
||||
//
|
||||
// arg: source=message string; separator=message separator (1 byte)
|
||||
// ret: (none)
|
||||
|
||||
// WON ADD
|
||||
//void util_SplitMessage(char *source, char *separator)
|
||||
BOOL util_SplitMessage(char *source, char *separator)
|
||||
{
|
||||
if (source && separator) { // NULL input is invalid.
|
||||
char *ptr;
|
||||
char *head = source;
|
||||
|
||||
// Nuke 1006 : Bug fix
|
||||
while ((ptr = (char *) strstr(head, separator)) && (SliceCount<SLICE_MAX) && (SliceCount>=0)) {
|
||||
ptr[0] = '\0';
|
||||
if (strlen(head)<SLICE_SIZE) { // discard slices too large
|
||||
|
||||
// Nuke 0701
|
||||
// if (*MesgSlice != *dumb) {
|
||||
//print("Warning! Mem may be broken\n");
|
||||
//}
|
||||
/*
|
||||
if (MesgSlice[SliceCount]==0xffffffff) {
|
||||
print("MesgSlice[%d] broken\n",SliceCount);
|
||||
return FALSE;
|
||||
} else {
|
||||
*/
|
||||
strcpy(MesgSlice[SliceCount], head);
|
||||
SliceCount++;
|
||||
//}
|
||||
|
||||
}
|
||||
head = ptr+1;
|
||||
}
|
||||
strcpy(source, head); // remove splited slices
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Encode the message
|
||||
//
|
||||
// arg: dst=output src=input
|
||||
// ret: (none)
|
||||
void util_EncodeMessage(char *dst, char *src)
|
||||
{
|
||||
// strcpy(dst, src);
|
||||
// util_xorstring(dst, src);
|
||||
|
||||
int rn = rand() % 99;
|
||||
int t1, t2;
|
||||
char t3[1024*64], tz[1024*64];
|
||||
util_swapint(&t1, &rn, "2413");
|
||||
t2 = t1 ^ 0xffffffff;
|
||||
util_256to64(tz, (char *) &t2, sizeof(int), DEFAULTTABLE);
|
||||
|
||||
util_shlstring(t3, src, rn);
|
||||
strcat(tz, t3);
|
||||
util_xorstring(dst, tz);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Decode the message
|
||||
//
|
||||
// arg: dst=output src=input
|
||||
// ret: (none)
|
||||
void util_DecodeMessage(char *dst, char *src)
|
||||
{
|
||||
// strcpy(dst, src);
|
||||
// util_xorstring(dst, src);
|
||||
|
||||
#define INTCODESIZE (sizeof(int)*8+5)/6
|
||||
|
||||
int rn;
|
||||
int *t1, t2;
|
||||
char t3[1024*4], t4[1024*4]; // This buffer is enough for an integer.
|
||||
char tz[1024*64];
|
||||
if (src[strlen(src)-1]=='\n') src[strlen(src)-1]='\0';
|
||||
util_xorstring(tz, src);
|
||||
|
||||
// get seed
|
||||
strncpy(t4, tz, INTCODESIZE);
|
||||
t4[INTCODESIZE] = '\0';
|
||||
util_64to256(t3, t4, DEFAULTTABLE);
|
||||
t1 = (int *) t3;
|
||||
t2 = *t1 ^ 0xffffffff;
|
||||
util_swapint(&rn, &t2, "3142");
|
||||
|
||||
util_shrstring(dst, tz + INTCODESIZE, rn);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Get a function information from MesgSlice. A function is a complete
|
||||
// and identifiable message received, beginned at DEFAULTFUNCBEGIN and
|
||||
// ended at DEFAULTFUNCEND. This routine will return the function ID
|
||||
// (Action ID) and how many fields this function have.
|
||||
//
|
||||
// arg: func=return function ID fieldcount=return fields of the function
|
||||
// ret: 1=success 0=failed (function not complete)
|
||||
int util_GetFunctionFromSlice(int *func, int *fieldcount)
|
||||
{
|
||||
char t1[1024*16];
|
||||
int i;
|
||||
|
||||
// if (strcmp(MesgSlice[0], DEFAULTFUNCBEGIN)!=0) util_DiscardMessage();
|
||||
|
||||
strcpy(t1, MesgSlice[1]);
|
||||
// Robin adjust
|
||||
//*func=atoi(t1);
|
||||
*func=atoi(t1)-13;
|
||||
for (i=0; i<SLICE_MAX; i++)
|
||||
if (strcmp(MesgSlice[i], DEFAULTFUNCEND)==0) {
|
||||
*fieldcount=i-2; // - "&" - "#" - "func" 3 fields
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0; // failed: message not complete
|
||||
}
|
||||
|
||||
void util_DiscardMessage(void)
|
||||
{
|
||||
SliceCount=0;
|
||||
}
|
||||
extern int clisendfunc;
|
||||
void _util_SendMesg(char *file, int line, int fd, int func, char *buffer)
|
||||
{
|
||||
//print("\nfunc=%d,buff=%s\n",func,buffer);
|
||||
// char t1[16384], t2[16384];
|
||||
char t1[1024*32], t2[1024*32];
|
||||
clisendfunc=func;
|
||||
// WON ADD
|
||||
if( fd < 0 ){
|
||||
//print("\n SendMesg fd err %s:%d!! ==> func(%d)\n", file, line, func);
|
||||
return;
|
||||
}
|
||||
// Robin adjust
|
||||
//sprintf(t1, "&;%d%s;#;", func, buffer);
|
||||
sprintf(t1, "&;%d%s;#;", func+23, buffer);
|
||||
util_EncodeMessage(t2, t1);
|
||||
#ifdef __STONEAGE
|
||||
lssproto_Send(fd, t2);
|
||||
#endif
|
||||
}
|
||||
|
||||
int util_256to64(char *dst, char *src, int len, char *table)
|
||||
{
|
||||
unsigned int dw,dwcounter,i;
|
||||
|
||||
if (!dst || !src || !table) return 0;
|
||||
dw=0;
|
||||
dwcounter=0;
|
||||
for (i=0; i<len; i++) {
|
||||
dw = ( ((unsigned int)src[i] & 0xff) << ((i%3)*2) ) | dw;
|
||||
dst[ dwcounter++ ] = table[ dw & 0x3f ];
|
||||
dw = ( dw >> 6 );
|
||||
if (i%3==2) {
|
||||
dst[ dwcounter++ ] = table[ dw & 0x3f ];
|
||||
dw = 0;
|
||||
}
|
||||
}
|
||||
if (dw) dst[ dwcounter++ ] = table[ dw ];
|
||||
dst[ dwcounter ] = '\0';
|
||||
return dwcounter;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Convert 6-bit strings into 8-bit strings, buffers that store these strings
|
||||
// must have enough space.
|
||||
//
|
||||
// arg: dst=6-bit string; src=8-bit string; table=mapping table
|
||||
// ret: 0=failed >0=bytes converted
|
||||
int util_64to256(char *dst, char *src, char *table)
|
||||
{
|
||||
unsigned int dw,dwcounter,i;
|
||||
char *ptr = NULL;
|
||||
|
||||
dw=0;
|
||||
dwcounter=0;
|
||||
if (!dst || !src || !table) return 0;
|
||||
for (i=0; i<strlen(src); i++) {
|
||||
ptr = (char *) index(table, src[i]);
|
||||
if (!ptr) return 0;
|
||||
if (i%4) {
|
||||
dw = ((unsigned int)(ptr-table) & 0x3f) << ((4-(i%4))*2) | dw;
|
||||
dst[ dwcounter++ ] = dw & 0xff;
|
||||
dw = dw >> 8;
|
||||
} else {
|
||||
dw = (unsigned int)(ptr-table) & 0x3f;
|
||||
}
|
||||
}
|
||||
if (dw) dst[ dwcounter++ ] = dw & 0xff;
|
||||
dst[ dwcounter ] = '\0';
|
||||
return dwcounter;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// This basically is a 256to64 encoder. But it shifts the result by key.
|
||||
//
|
||||
// arg: dst=6-bit string; src=8-bit string; len=src strlen;
|
||||
// table=mapping table; key=rotate key;
|
||||
// ret: 0=failed >0=bytes converted
|
||||
int util_256to64_shr(char *dst, char *src, int len, char *table, char *key)
|
||||
{
|
||||
unsigned int dw,dwcounter,i,j;
|
||||
|
||||
if (!dst || !src || !table || !key) return 0;
|
||||
if (strlen(key)<1) return 0; // key can't be empty.
|
||||
dw=0;
|
||||
dwcounter=0;
|
||||
j=0;
|
||||
for (i=0; i<len; i++) {
|
||||
dw = ( ((unsigned int)src[i] & 0xff) << ((i%3)*2) ) | dw;
|
||||
dst[ dwcounter++ ] = table[ ((dw & 0x3f) + key[j]) % 64 ]; // check!
|
||||
j++; if (!key[j]) j=0;
|
||||
dw = ( dw >> 6 );
|
||||
if (i%3==2) {
|
||||
dst[ dwcounter++ ] = table[ ((dw & 0x3f) + key[j]) % 64 ];// check!
|
||||
j++; if (!key[j]) j=0;
|
||||
dw = 0;
|
||||
}
|
||||
}
|
||||
if (dw) dst[ dwcounter++ ] = table[ (dw + key[j]) % 64 ]; // check!
|
||||
dst[ dwcounter ] = '\0';
|
||||
return dwcounter;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Decoding function of util_256to64_shr.
|
||||
//
|
||||
// arg: dst=8-bit string; src=6-bit string; table=mapping table;
|
||||
// key=rotate key;
|
||||
// ret: 0=failed >0=bytes converted
|
||||
int util_shl_64to256(char *dst, char *src, char *table, char *key)
|
||||
{
|
||||
unsigned int dw,dwcounter,i,j;
|
||||
char *ptr = NULL;
|
||||
|
||||
if (!key || (strlen(key)<1)) return 0; // must have key
|
||||
|
||||
dw=0;
|
||||
dwcounter=0;
|
||||
j=0;
|
||||
if (!dst || !src || !table) return 0;
|
||||
for (i=0; i<strlen(src); i++) {
|
||||
ptr = (char *) index(table, src[i]);
|
||||
if (!ptr) return 0;
|
||||
if (i%4) {
|
||||
// check!
|
||||
dw = ((((unsigned int)(ptr-table) & 0x3f) + 64 - key[j]) % 64)
|
||||
<< ((4-(i%4))*2) | dw;
|
||||
j++; if (!key[j]) j=0;
|
||||
dst[ dwcounter++ ] = dw & 0xff;
|
||||
dw = dw >> 8;
|
||||
} else {
|
||||
// check!
|
||||
dw = (((unsigned int)(ptr-table) & 0x3f) + 64 - key[j]) % 64;
|
||||
j++; if (!key[j]) j=0;
|
||||
}
|
||||
}
|
||||
if (dw) dst[ dwcounter++ ] = dw & 0xff;
|
||||
dst[ dwcounter ] = '\0';
|
||||
return dwcounter;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// This basically is a 256to64 encoder. But it shifts the result by key.
|
||||
//
|
||||
// arg: dst=6-bit string; src=8-bit string; len=src strlen;
|
||||
// table=mapping table; key=rotate key;
|
||||
// ret: 0=failed >0=bytes converted
|
||||
int util_256to64_shl(char *dst, char *src, int len, char *table, char *key)
|
||||
{
|
||||
unsigned int dw,dwcounter,i,j;
|
||||
|
||||
if (!dst || !src || !table || !key) return 0;
|
||||
if (strlen(key)<1) return 0; // key can't be empty.
|
||||
dw=0;
|
||||
dwcounter=0;
|
||||
j=0;
|
||||
for (i=0; i<len; i++) {
|
||||
dw = ( ((unsigned int)src[i] & 0xff) << ((i%3)*2) ) | dw;
|
||||
dst[ dwcounter++ ] = table[ ((dw & 0x3f) + 64 - key[j]) % 64 ]; // check!
|
||||
j++; if (!key[j]) j=0;
|
||||
dw = ( dw >> 6 );
|
||||
if (i%3==2) {
|
||||
dst[ dwcounter++ ] = table[ ((dw & 0x3f) + 64 - key[j]) % 64 ]; // check!
|
||||
j++; if (!key[j]) j=0;
|
||||
dw = 0;
|
||||
}
|
||||
}
|
||||
if (dw) dst[ dwcounter++ ] = table[ (dw + 64 - key[j]) % 64 ]; // check!
|
||||
dst[ dwcounter ] = '\0';
|
||||
return dwcounter;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Decoding function of util_256to64_shl.
|
||||
//
|
||||
// arg: dst=8-bit string; src=6-bit string; table=mapping table;
|
||||
// key=rotate key;
|
||||
// ret: 0=failed >0=bytes converted
|
||||
int util_shr_64to256(char *dst, char *src, char *table, char *key)
|
||||
{
|
||||
unsigned int dw,dwcounter,i,j;
|
||||
char *ptr = NULL;
|
||||
|
||||
if (!key || (strlen(key)<1)) return 0; // must have key
|
||||
|
||||
dw=0;
|
||||
dwcounter=0;
|
||||
j=0;
|
||||
if (!dst || !src || !table) return 0;
|
||||
for (i=0; i<strlen(src); i++) {
|
||||
ptr = (char *) index(table, src[i]);
|
||||
if (!ptr) return 0;
|
||||
if (i%4) {
|
||||
// check!
|
||||
dw = ((((unsigned int)(ptr-table) & 0x3f) + key[j]) % 64)
|
||||
<< ((4-(i%4))*2) | dw;
|
||||
j++; if (!key[j]) j=0;
|
||||
dst[ dwcounter++ ] = dw & 0xff;
|
||||
dw = dw >> 8;
|
||||
} else {
|
||||
// check!
|
||||
dw = (((unsigned int)(ptr-table) & 0x3f) + key[j]) % 64;
|
||||
j++; if (!key[j]) j=0;
|
||||
}
|
||||
}
|
||||
if (dw) dst[ dwcounter++ ] = dw & 0xff;
|
||||
dst[ dwcounter ] = '\0';
|
||||
return dwcounter;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Swap a integer (4 byte).
|
||||
// The value "rule" indicates the swaping rule. It's a 4 byte string
|
||||
// such as "1324" or "2431".
|
||||
//
|
||||
void util_swapint(int *dst, int *src, char *rule)
|
||||
{
|
||||
char *ptr, *qtr;
|
||||
int i;
|
||||
|
||||
ptr = (char *) src;
|
||||
qtr = (char *) dst;
|
||||
for (i=0; i<4; i++) qtr[rule[i]-'1']=ptr[i];
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Xor a string. Be careful that your string contains '0xff'. Your
|
||||
// data may lose.
|
||||
//
|
||||
void util_xorstring(char *dst, char *src)
|
||||
{
|
||||
int i;
|
||||
if (strlen(src)>1024*64) return;
|
||||
|
||||
for (i=0; i<strlen(src); i++){
|
||||
dst[i]=src[i]^255;
|
||||
}
|
||||
dst[i]='\0';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Shift the string right.
|
||||
//
|
||||
void util_shrstring(char *dst, char *src, int offs)
|
||||
{
|
||||
char *ptr;
|
||||
if (!dst || !src || (strlen(src)<1)) return;
|
||||
|
||||
offs = strlen(src) - (offs % strlen(src));
|
||||
ptr = src+offs;
|
||||
strcpy(dst, ptr);
|
||||
strncat(dst, src, offs);
|
||||
dst[strlen(src)]='\0';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Shift the string left.
|
||||
//
|
||||
void util_shlstring(char *dst, char *src, int offs)
|
||||
{
|
||||
char *ptr;
|
||||
if (!dst || !src || (strlen(src)<1)) return;
|
||||
|
||||
offs = offs % strlen(src);
|
||||
ptr = src+offs;
|
||||
strcpy(dst, ptr);
|
||||
strncat(dst, src, offs);
|
||||
dst[strlen(src)]='\0';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Convert a message slice into integer. Return a checksum.
|
||||
//
|
||||
// arg: sliceno=slice index in MesgSlice value=result
|
||||
// ret: checksum, this value must match the one generated by util_mkint
|
||||
int util_deint(int fd,int sliceno, int *value)
|
||||
{
|
||||
int *t1, t2;
|
||||
char t3[1024*4]; // This buffer is enough for an integer.
|
||||
|
||||
if (strlen(PersonalKey)==0) strcpy(PersonalKey, getDefaultKey(fd));
|
||||
|
||||
util_shl_64to256(t3, MesgSlice[sliceno], DEFAULTTABLE, PersonalKey);
|
||||
t1 = (int *) t3;
|
||||
t2 = *t1 ^ 0xffffffff;
|
||||
util_swapint(value, &t2, "2413");
|
||||
|
||||
return *value;
|
||||
}
|
||||
|
||||
int util_mkint(int fd,char *buffer, int value)
|
||||
{
|
||||
int t1, t2;
|
||||
char t3[1024*4];
|
||||
|
||||
if (strlen(PersonalKey)==0) strcpy(PersonalKey, getDefaultKey(fd));
|
||||
util_swapint(&t1, &value, "3142");
|
||||
t2 = t1 ^ 0xffffffff;
|
||||
util_256to64_shr(t3, (char *) &t2, sizeof(int), DEFAULTTABLE, PersonalKey);
|
||||
strcat(buffer, ";");
|
||||
strcat(buffer, t3);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Convert a message slice into string. Return a checksum.
|
||||
//
|
||||
// arg: sliceno=slice index in MesgSlice value=result
|
||||
// ret: checksum, this value must match the one generated by util_mkstring
|
||||
int util_destring(int fd,int sliceno, char *value)
|
||||
{
|
||||
|
||||
if (strlen(PersonalKey)==0) strcpy(PersonalKey, getDefaultKey(fd));
|
||||
|
||||
util_shr_64to256(value, MesgSlice[sliceno], DEFAULTTABLE, PersonalKey);
|
||||
|
||||
return strlen(value);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Convert a string into buffer (a string). Return a checksum.
|
||||
//
|
||||
// arg: buffer=output value=data to pack
|
||||
// ret: checksum, this value must match the one generated by util_destring
|
||||
int util_mkstring(int fd,char *buffer, char *value)
|
||||
{
|
||||
char t1[SLICE_SIZE];
|
||||
|
||||
if (strlen(PersonalKey)==0) strcpy(PersonalKey, getDefaultKey(fd));
|
||||
|
||||
util_256to64_shl(t1, value, strlen(value), DEFAULTTABLE, PersonalKey);
|
||||
strcat(buffer, ";"); // It's important to append a SEPARATOR between fields
|
||||
strcat(buffer, t1);
|
||||
|
||||
return strlen(value);
|
||||
}
|
||||
#ifdef _FIX_LSSP_S_BUG
|
||||
int is_digit(char *str)
|
||||
{
|
||||
uint len = strlen(str);
|
||||
while(len > 0) {
|
||||
if (*str < '0' || *str > '9') {
|
||||
return -1;
|
||||
}
|
||||
str++;
|
||||
len--;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
11162
battle/battle.c
Normal file
11162
battle/battle.c
Normal file
File diff suppressed because it is too large
Load Diff
533
battle/battle_ai.c
Normal file
533
battle/battle_ai.c
Normal file
@ -0,0 +1,533 @@
|
||||
#include "version.h"
|
||||
#include <stdio.h>
|
||||
#include "common.h"
|
||||
#include "char.h"
|
||||
#include "char_base.h"
|
||||
#include "battle.h"
|
||||
#include "npcutil.h"
|
||||
#include "pet_skill.h"
|
||||
|
||||
struct B_AI_RESULT {
|
||||
BATTLE_COM command; /* 窒毛允月井 */
|
||||
int target; /* 簿卞 */
|
||||
};
|
||||
|
||||
static int BATTLE_ai_normal( int, int, BATTLE_ENTRY *,struct B_AI_RESULT *);
|
||||
|
||||
static int (*functbl[])( int, int, BATTLE_ENTRY *,struct B_AI_RESULT *) = {
|
||||
NULL,
|
||||
BATTLE_ai_normal,
|
||||
};
|
||||
|
||||
int BATTLE_ai_all( int battleindex, int side, int turn)
|
||||
{
|
||||
int i;
|
||||
int rc = FALSE;
|
||||
BATTLE_ENTRY *pEntry;
|
||||
struct B_AI_RESULT result;
|
||||
|
||||
if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX;
|
||||
if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM;
|
||||
if( BATTLE_CHECKSIDE( side ^1) == FALSE )return BATTLE_ERR_PARAM;
|
||||
if( BattleArray[battleindex].Side[side].type != BATTLE_S_TYPE_ENEMY ) return FALSE;
|
||||
pEntry = BattleArray[battleindex].Side[side^1].Entry;
|
||||
for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){
|
||||
int charaindex = BattleArray[battleindex].Side[side].Entry[i].charaindex;
|
||||
int mode;
|
||||
if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue;
|
||||
|
||||
mode = CHAR_getWorkInt( charaindex, CHAR_WORKTACTICS);
|
||||
if( mode < 0 || mode >= arraysizeof( functbl)){
|
||||
//print( "BATTLE_ai_all 中,战斗逻辑模式很奇怪(%s)(%d)\n",
|
||||
//CHAR_getUseName( charaindex ), mode );
|
||||
mode = 1;
|
||||
}
|
||||
if( BATTLE_IsCharge( charaindex ) == TRUE ){
|
||||
CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK );
|
||||
continue;
|
||||
}
|
||||
if( BattleArray[battleindex].Side[side].flg & BSIDE_FLG_SURPRISE) {
|
||||
CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE );
|
||||
CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK );
|
||||
}else {
|
||||
if( functbl[mode] != NULL ) {
|
||||
rc = functbl[mode]( turn, charaindex, pEntry, &result);
|
||||
if( BATTLE_CanMoveCheck( charaindex ) == FALSE ){
|
||||
result.command = BATTLE_COM_NONE;
|
||||
}
|
||||
}
|
||||
if( rc ) {
|
||||
#ifdef _BATTLENPC_WARP_PLAYER
|
||||
if(result.command==BATTLE_COM_WARP){
|
||||
for( i=0; i<BATTLE_ENTRY_MAX; i++){
|
||||
int tindex = (pEntry+i)->charaindex;
|
||||
if( !CHAR_CHECKINDEX( tindex ))continue;
|
||||
if( CHAR_getFlg( tindex, CHAR_ISDIE)) continue;
|
||||
if( CHAR_getWorkInt( tindex, CHAR_WORKBATTLEMODE)
|
||||
== BATTLE_CHARMODE_RESCUE ) continue;
|
||||
if( CHAR_getInt( tindex, CHAR_WHICHTYPE)==CHAR_TYPEPLAYER){
|
||||
char sBuff[1024]="", sBuff1[1024]="";
|
||||
int ss[3];
|
||||
int sii;
|
||||
int rc = 1;
|
||||
if( NPC_Util_GetStrFromStrWithDelim( CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_ACT_CONDITION),
|
||||
"wp", sBuff, sizeof( sBuff))!=NULL){
|
||||
for( sii=1; sii<=3; sii++){
|
||||
if(getStringFromIndexWithDelim( sBuff, ";", sii, sBuff1, sizeof( sBuff1)))
|
||||
{ss[sii-1]=atoi(sBuff1);}
|
||||
else
|
||||
{rc=0;}
|
||||
}
|
||||
if(rc){
|
||||
CHAR_warpToSpecificPoint( tindex, ss[0], ss[1], ss[2]);
|
||||
BATTLE_WatchStop( tindex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, result.command );
|
||||
CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2,
|
||||
result.target + (side^1)*SIDE_OFFSET);
|
||||
CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK );
|
||||
//CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int BATTLE_ai_one( int charaindex, int battleindex, int side, int turn)
|
||||
{
|
||||
int rc = FALSE;
|
||||
BATTLE_ENTRY *pEntry;
|
||||
struct B_AI_RESULT result;
|
||||
int mode;
|
||||
|
||||
/* 由仿丢□正民尼永弁 */
|
||||
if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX;
|
||||
if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM;
|
||||
if( BATTLE_CHECKSIDE( side ^1) == FALSE )return BATTLE_ERR_PARAM;
|
||||
|
||||
/* 及扔奶玉隋垫丹 */
|
||||
/* 衬平乓仿动陆反 仃月 */
|
||||
if( BattleArray[battleindex].Side[side].type != BATTLE_S_TYPE_ENEMY ) return 0;
|
||||
|
||||
/* 覆础扔奶玉 */
|
||||
pEntry = BattleArray[battleindex].Side[side^1].Entry;
|
||||
|
||||
mode = CHAR_getWorkInt( charaindex, CHAR_WORKTACTICS);
|
||||
/* 质 毛蕊曰坌仃月 */
|
||||
if( mode < 0 || mode >= arraysizeof( functbl)) return FALSE;
|
||||
/* 质 毛蕊曰坌仃月 */
|
||||
if( functbl[mode] != NULL ) {
|
||||
rc = functbl[mode]( turn, charaindex, pEntry, &result);
|
||||
}
|
||||
if( rc ) {
|
||||
CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, result.command );
|
||||
if( result.command == BATTLE_COM_ATTACK) {
|
||||
CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2,
|
||||
result.target + (side^1)*SIDE_OFFSET);
|
||||
}
|
||||
CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK );
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* 骚卞锹澎毛瑁户月 */
|
||||
|
||||
#define B_AI_NORMAL_ATTACKOPTION "at" /* 猾左皿扑亦件 */
|
||||
#define B_AI_NORMAL_GUARDOPTION "gu" /* 豢左皿扑亦件 */
|
||||
#define B_AI_NORMAL_MAGICOPTION "ma" /* 热诸左皿扑亦件 */
|
||||
#define B_AI_NORMAL_ESCAPEOPTION "es" /* 仆月左皿扑亦件 */
|
||||
#define B_AI_NORMAL_WAZAOPTION "wa" /* 左皿扑亦件 */
|
||||
#ifdef _ENEMY_ATTACK_AI
|
||||
#define B_AI_NORMAL_RANDAOPTION "rn"
|
||||
#define B_AI_NORMAL_RANDOMOPTIONNUM 1
|
||||
#endif
|
||||
|
||||
#define B_AI_NORMAL_ATTACKSUBOPTIONNUM 3
|
||||
#define B_AI_NORMAL_GUARDSUBOPTIONNUM 1
|
||||
#define B_AI_NORMAL_MAGICSUBOPTIONNUM 1
|
||||
#define B_AI_NORMAL_ESCAPESUBOPTIONNUM 1
|
||||
#define B_AI_NORMAL_WAZASUBOPTIONNUM 7
|
||||
|
||||
/* 左皿扑亦件娄醒及 侬及烂聒 */
|
||||
#define B_AI_NORMAL_TARGET_ALL 1
|
||||
#define B_AI_NORMAL_TARGET_PLAYER 2
|
||||
#define B_AI_NORMAL_TARGET_PET 3
|
||||
#ifdef _ENEMY_ATTACK_AI
|
||||
#define B_AI_NORMAL_TARGET_LEADER 4
|
||||
#endif
|
||||
#define B_AI_NORMAL_SELECT_RANDOM 1
|
||||
#define B_AI_NORMAL_SELECT_HP_MAX 2
|
||||
#define B_AI_NORMAL_SELECT_HP_MIN 3
|
||||
#ifdef _ENEMY_ATTACK_AI
|
||||
#define B_AI_NORMAL_SELECT_STR_MAX 4
|
||||
#define B_AI_NORMAL_SELECT_DEX_MAX 5
|
||||
#define B_AI_NORMAL_SELECT_DEX_MIN 6
|
||||
#define B_AI_NORMAL_SELECT_ATT_SUBDUE 7
|
||||
enum{
|
||||
AI_ATT_EARTHAT = 1,
|
||||
AI_ATT_WATERAT,
|
||||
AI_ATT_FIREAT,
|
||||
AI_ATT_WINDAT
|
||||
};
|
||||
int GetSubdueAttribute(int index){
|
||||
int s_a = CHAR_getWorkInt( index, CHAR_WORKFIXEARTHAT);
|
||||
int s_b = CHAR_getWorkInt( index, CHAR_WORKFIXWATERAT);
|
||||
int s_c = CHAR_getWorkInt( index, CHAR_WORKFIXFIREAT);
|
||||
int s_d = CHAR_getWorkInt( index, CHAR_WORKFIXWINDAT);
|
||||
return ((s_a>s_c)?((s_b>s_d)?((s_a>s_b)?(2):(3)):((s_a>s_d)?(2):(1))):((s_b>s_d)?((s_c>s_b)?(4):(3)):((s_c>s_d)?(4):(1))));
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
B_AI_ATTACKMODE = 1,
|
||||
B_AI_GURADMODE,
|
||||
B_AI_MAGICMODE,
|
||||
B_AI_ESCAPEMODE,
|
||||
B_AI_WAZAMODE0,
|
||||
B_AI_WAZAMODE1,
|
||||
B_AI_WAZAMODE2,
|
||||
B_AI_WAZAMODE3,
|
||||
B_AI_WAZAMODE4,
|
||||
B_AI_WAZAMODE5,
|
||||
B_AI_WAZAMODE6,
|
||||
}B_AI_MODE;
|
||||
|
||||
static int BATTLE_ai_normal( int turn, int charaindex,
|
||||
BATTLE_ENTRY *pEntry,
|
||||
struct B_AI_RESULT *result)
|
||||
{
|
||||
int at[B_AI_NORMAL_ATTACKSUBOPTIONNUM] = { 0,0,0}; /* 猾左皿扑亦件 */
|
||||
int gu[B_AI_NORMAL_GUARDSUBOPTIONNUM] = {0}; /* 左皿扑亦件 */
|
||||
int ma[B_AI_NORMAL_MAGICSUBOPTIONNUM] = {0}; /* 左皿扑亦件 */
|
||||
int es[B_AI_NORMAL_ESCAPESUBOPTIONNUM] = {0}; /* 左皿扑亦件 */
|
||||
int wa[B_AI_NORMAL_WAZASUBOPTIONNUM] = {0,0,0,0, 0,0,0};/* 左皿扑亦件 */
|
||||
#ifdef _ENEMY_ATTACK_AI
|
||||
int rn[B_AI_NORMAL_RANDOMOPTIONNUM] = {1};
|
||||
#endif
|
||||
int target[BATTLE_ENTRY_MAX];
|
||||
int cnt;
|
||||
int i;
|
||||
int r;
|
||||
int rc;
|
||||
int mode=0;
|
||||
char buff[256];
|
||||
char buff2[256];
|
||||
|
||||
if( turn == 1 ) {
|
||||
//print( "应该没这回事。\n" );
|
||||
return FALSE;
|
||||
}
|
||||
if( NPC_Util_GetStrFromStrWithDelim( CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION),
|
||||
B_AI_NORMAL_ATTACKOPTION, buff, sizeof( buff)) != NULL ){
|
||||
for( i = 1; i < B_AI_NORMAL_ATTACKSUBOPTIONNUM + 1; i ++ ) {
|
||||
rc = getStringFromIndexWithDelim( buff, ";", i, buff2, sizeof( buff2));
|
||||
if( rc != TRUE ) {
|
||||
//print( "battle_ai.c:Invarid Param [%s]\n",
|
||||
//CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION));
|
||||
return FALSE;
|
||||
}
|
||||
at[i-1] = atoi( buff2);
|
||||
}
|
||||
}
|
||||
|
||||
if( NPC_Util_GetStrFromStrWithDelim( CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION),
|
||||
B_AI_NORMAL_GUARDOPTION, buff, sizeof( buff)) != NULL ){
|
||||
for( i = 1; i < B_AI_NORMAL_GUARDSUBOPTIONNUM + 1; i ++ ) {
|
||||
rc = getStringFromIndexWithDelim( buff, ";", i, buff2, sizeof( buff2));
|
||||
if( rc != TRUE ) {
|
||||
//print( "battle_ai.c:Invarid Param [%s]\n",
|
||||
//CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION));
|
||||
return FALSE;
|
||||
}
|
||||
gu[i-1] = atoi( buff2);
|
||||
}
|
||||
}
|
||||
if( NPC_Util_GetStrFromStrWithDelim( CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION),
|
||||
B_AI_NORMAL_MAGICOPTION,
|
||||
buff, sizeof( buff)) != NULL ){
|
||||
for( i = 1; i < B_AI_NORMAL_MAGICSUBOPTIONNUM + 1; i ++ ) {
|
||||
rc = getStringFromIndexWithDelim( buff, ";", i, buff2, sizeof( buff2));
|
||||
if( rc != TRUE ) {
|
||||
//print( "battle_ai.c:Invarid Param [%s]\n",
|
||||
//CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION));
|
||||
return FALSE;
|
||||
}
|
||||
ma[i-1] = atoi( buff2);
|
||||
|
||||
}
|
||||
}
|
||||
if( NPC_Util_GetStrFromStrWithDelim( CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION),
|
||||
B_AI_NORMAL_ESCAPEOPTION,
|
||||
buff, sizeof( buff)) != NULL ){
|
||||
for( i = 1; i < B_AI_NORMAL_ESCAPESUBOPTIONNUM + 1; i ++ ) {
|
||||
rc = getStringFromIndexWithDelim( buff, ";", i, buff2, sizeof( buff2));
|
||||
|
||||
if( rc != TRUE ) {
|
||||
//print( "battle_ai.c:Invarid Param [%s]\n",
|
||||
//CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION));
|
||||
return FALSE;
|
||||
}
|
||||
es[i-1] = atoi( buff2);
|
||||
}
|
||||
}
|
||||
if( NPC_Util_GetStrFromStrWithDelim( CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION),
|
||||
B_AI_NORMAL_WAZAOPTION,
|
||||
buff, sizeof( buff)) != NULL ){
|
||||
for( i = 1; i < B_AI_NORMAL_WAZASUBOPTIONNUM + 1; i ++ ) {
|
||||
rc = getStringFromIndexWithDelim( buff, ";", i, buff2, sizeof( buff2));
|
||||
if( rc != TRUE ) {
|
||||
}else{
|
||||
wa[i-1] = atoi( buff2);
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef _ENEMY_ATTACK_AI
|
||||
if( NPC_Util_GetStrFromStrWithDelim( CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION),
|
||||
B_AI_NORMAL_RANDAOPTION,
|
||||
buff, sizeof( buff))!=NULL){
|
||||
for( i=1; i<B_AI_NORMAL_RANDOMOPTIONNUM+1; i++){
|
||||
rc = getStringFromIndexWithDelim( buff, ";", i, buff2, sizeof( buff2));
|
||||
if(rc!=TRUE){
|
||||
//print( "battle_ai.c:Invarid Param [%s]\n",
|
||||
//CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION));
|
||||
return FALSE;
|
||||
}
|
||||
rn[i-1] = atoi( buff2);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef _BATTLENPC_WARP_PLAYER
|
||||
if( NPC_Util_GetStrFromStrWithDelim( CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_ACT_CONDITION),
|
||||
"tn", buff, sizeof( buff))!=NULL){
|
||||
int sTurn = atoi( buff);
|
||||
if(CHAR_getWorkInt( charaindex, CHAR_WORKTURN)==0)
|
||||
CHAR_setWorkInt( charaindex, CHAR_WORKTURN, 1);
|
||||
else
|
||||
CHAR_setWorkInt( charaindex, CHAR_WORKTURN, CHAR_getWorkInt( charaindex, CHAR_WORKTURN)+1);
|
||||
if(sTurn==CHAR_getWorkInt( charaindex, CHAR_WORKTURN)){
|
||||
result->command = BATTLE_COM_WARP;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if( at[0] == 0 && gu[0] == 0 && ma[0] == 0 && es[0] == 0 ){
|
||||
for( i = 0; i < B_AI_NORMAL_WAZASUBOPTIONNUM; i ++ ){
|
||||
if( wa[i] != 0 )break;
|
||||
}
|
||||
if( i >= B_AI_NORMAL_WAZASUBOPTIONNUM ){
|
||||
//print( "无指定任何的攻击方式。\n" );
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
while( !mode ) {
|
||||
int work = 0;
|
||||
work = at[0]+gu[0]+ma[0]+es[0];
|
||||
for( i = 0; i < B_AI_NORMAL_WAZASUBOPTIONNUM; i ++ ){
|
||||
work += wa[i];
|
||||
}
|
||||
r = RAND( 0, work - 1 );
|
||||
if( at[0] != 0 && r < at[0] ) mode = B_AI_ATTACKMODE;
|
||||
else if( gu[0] != 0 && r < at[0] + gu[0]) mode = B_AI_GURADMODE;
|
||||
else if( ma[0] != 0 && r < at[0] + gu[0] + ma[0]) mode = B_AI_MAGICMODE;
|
||||
else if( es[0] != 0 && r < at[0] + gu[0] + ma[0] + es[0] ){
|
||||
mode = B_AI_ESCAPEMODE;
|
||||
}
|
||||
if( mode ) break;
|
||||
work = at[0] + gu[0] + ma[0] + es[0];
|
||||
for( i = 0; i < B_AI_NORMAL_WAZASUBOPTIONNUM; i ++ ){
|
||||
work += wa[i];
|
||||
if( wa[i] != 0 && r < work ){
|
||||
mode = B_AI_WAZAMODE0+i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( mode == B_AI_ATTACKMODE || ( B_AI_WAZAMODE0 <= mode && mode <= B_AI_WAZAMODE6 )){
|
||||
while( 1 ) {
|
||||
for( i = 0 ; i < BATTLE_ENTRY_MAX; i ++ ) {
|
||||
target[i] = -1;
|
||||
}
|
||||
cnt = 0;
|
||||
for( i = 0; i < BATTLE_ENTRY_MAX ; i ++ ) {
|
||||
int tindex = (pEntry+i)->charaindex;
|
||||
if( !CHAR_CHECKINDEX( tindex ))continue;
|
||||
if( CHAR_getFlg( tindex, CHAR_ISDIE)) continue;
|
||||
if( CHAR_getWorkInt( tindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_RESCUE ) continue;
|
||||
switch( at[1]) {
|
||||
case B_AI_NORMAL_TARGET_PLAYER:
|
||||
if( CHAR_getInt( tindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ){
|
||||
target[cnt++] = i;
|
||||
}
|
||||
break;
|
||||
case B_AI_NORMAL_TARGET_PET:
|
||||
if( CHAR_getInt( tindex, CHAR_WHICHTYPE) == CHAR_TYPEPET){
|
||||
target[cnt++] = i;
|
||||
}
|
||||
break;
|
||||
#ifdef _ENEMY_ATTACK_AI
|
||||
case B_AI_NORMAL_TARGET_LEADER:
|
||||
if( CHAR_getWorkInt( tindex, CHAR_WORKPARTYMODE ) == CHAR_PARTY_LEADER) {
|
||||
target[cnt++] = i;
|
||||
}else if(!RAND( 0, 2)) {
|
||||
target[cnt++] = i;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
target[cnt++] = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( cnt == 0 && at[1] == B_AI_NORMAL_TARGET_ALL ) return FALSE;
|
||||
if( cnt > 0 ) break;
|
||||
at[1] = B_AI_NORMAL_TARGET_ALL;
|
||||
}
|
||||
result->command = BATTLE_COM_NONE;
|
||||
if( at[2] == B_AI_NORMAL_SELECT_RANDOM ) {
|
||||
r = RAND( 0, cnt-1);
|
||||
result->command = BATTLE_COM_ATTACK;
|
||||
result->target = target[r];
|
||||
}else if( at[2] == B_AI_NORMAL_SELECT_HP_MAX || at[2] == B_AI_NORMAL_SELECT_HP_MIN ){
|
||||
int top = 0;
|
||||
for( i = 0; i < cnt; i ++ ) {
|
||||
if( i ==0 ) top = target[i];
|
||||
else {
|
||||
int tophp = CHAR_getInt((pEntry+top)->charaindex, CHAR_HP);
|
||||
int comphp = CHAR_getInt((pEntry+target[i])->charaindex, CHAR_HP);
|
||||
if( at[2] == B_AI_NORMAL_SELECT_HP_MAX ) {
|
||||
if( comphp > tophp ) top = target[i];
|
||||
}
|
||||
else {
|
||||
if( comphp < tophp ) top = target[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef _ENEMY_ATTACK_AI
|
||||
if(!RAND( 0, rn[0]))
|
||||
result->target = target[RAND( 0, cnt-1)];
|
||||
else
|
||||
result->target = top;
|
||||
result->command = BATTLE_COM_ATTACK;
|
||||
#else
|
||||
result->command = BATTLE_COM_ATTACK;
|
||||
result->target = top;
|
||||
#endif
|
||||
}
|
||||
#ifdef _ENEMY_ATTACK_AI
|
||||
else if(at[2] == B_AI_NORMAL_SELECT_STR_MAX) {
|
||||
int top = 0;
|
||||
for( i=0; i<cnt; i++) {
|
||||
if(i==0) top = target[i];
|
||||
else {
|
||||
int topstr = CHAR_getInt( (pEntry+top)->charaindex, CHAR_STR);
|
||||
int compstr = CHAR_getInt( (pEntry+target[i])->charaindex, CHAR_STR);
|
||||
if(compstr>topstr) top = target[i];
|
||||
}
|
||||
}
|
||||
if(!RAND( 0, rn[0]))
|
||||
result->target = target[RAND( 0, cnt-1)];
|
||||
else
|
||||
result->target = top;
|
||||
result->command = BATTLE_COM_ATTACK;
|
||||
}
|
||||
else if(at[2] == B_AI_NORMAL_SELECT_DEX_MAX ||
|
||||
at[2] == B_AI_NORMAL_SELECT_DEX_MIN) {
|
||||
int top = 0;
|
||||
for( i=0; i<cnt; i++) {
|
||||
if(i==0) top = target[i];
|
||||
else {
|
||||
int topdex = CHAR_getInt( (pEntry+top)->charaindex, CHAR_DEX);
|
||||
int compdex = CHAR_getInt( (pEntry+target[i])->charaindex, CHAR_DEX);
|
||||
if(at[2]==B_AI_NORMAL_SELECT_DEX_MAX) {
|
||||
if(compdex>topdex) top = target[i];
|
||||
}else {
|
||||
if(compdex<topdex) top = target[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!RAND( 0, rn[0]))
|
||||
result->target = target[RAND( 0, cnt-1)];
|
||||
else
|
||||
result->target = top;
|
||||
result->command = BATTLE_COM_ATTACK;
|
||||
}
|
||||
else if(at[2] == B_AI_NORMAL_SELECT_ATT_SUBDUE) {
|
||||
int top = 0;
|
||||
for( i=0; i<cnt; i++) {
|
||||
if(i==0) top = target[i];
|
||||
else {
|
||||
switch(GetSubdueAttribute(charaindex))
|
||||
{
|
||||
case AI_ATT_EARTHAT:
|
||||
{
|
||||
int topatt = CHAR_getWorkInt( (pEntry+top)->charaindex, CHAR_WORKFIXEARTHAT);
|
||||
int compatt = CHAR_getWorkInt( (pEntry+target[i])->charaindex, CHAR_WORKFIXEARTHAT);
|
||||
if(compatt>topatt) top = target[i];
|
||||
}
|
||||
break;
|
||||
case AI_ATT_WATERAT:
|
||||
{
|
||||
int topatt = CHAR_getWorkInt( (pEntry+top)->charaindex, CHAR_WORKFIXWATERAT);
|
||||
int compatt = CHAR_getWorkInt( (pEntry+target[i])->charaindex, CHAR_WORKFIXWATERAT);
|
||||
if(compatt>topatt) top = target[i];
|
||||
}
|
||||
break;
|
||||
case AI_ATT_FIREAT:
|
||||
{
|
||||
int topatt = CHAR_getWorkInt( (pEntry+top)->charaindex, CHAR_WORKFIXFIREAT);
|
||||
int compatt = CHAR_getWorkInt( (pEntry+target[i])->charaindex, CHAR_WORKFIXFIREAT);
|
||||
if(compatt>topatt) top = target[i];
|
||||
}
|
||||
break;
|
||||
case AI_ATT_WINDAT:
|
||||
{
|
||||
int topatt = CHAR_getWorkInt( (pEntry+top)->charaindex, CHAR_WORKFIXWINDAT);
|
||||
int compatt = CHAR_getWorkInt( (pEntry+target[i])->charaindex, CHAR_WORKFIXWINDAT);
|
||||
if(compatt>topatt) top = target[i];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!RAND( 0, rn[0]))
|
||||
result->target = target[RAND( 0, cnt-1)];
|
||||
else
|
||||
result->target = top;
|
||||
result->command = BATTLE_COM_ATTACK;
|
||||
}
|
||||
#endif
|
||||
else{
|
||||
return FALSE;
|
||||
}
|
||||
if( B_AI_WAZAMODE0 <= mode && mode <= B_AI_WAZAMODE6 ){
|
||||
if( PETSKILL_Use( charaindex, mode - B_AI_WAZAMODE0, result->target,NULL ) == TRUE ){
|
||||
result->command = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 );
|
||||
return TRUE;
|
||||
}else{
|
||||
// print( "此项技能尚未设定(%s):(%d)\n",
|
||||
// CHAR_getUseName( charaindex), mode - B_AI_WAZAMODE0 );
|
||||
return FALSE;
|
||||
}
|
||||
}else
|
||||
if( mode == B_AI_ATTACKMODE ){
|
||||
result->command = BATTLE_COM_ATTACK;
|
||||
return TRUE;
|
||||
}
|
||||
}else if( mode == B_AI_GURADMODE ) {
|
||||
result->command = BATTLE_COM_GUARD;
|
||||
return TRUE;
|
||||
}else if( mode == B_AI_ESCAPEMODE ) {
|
||||
result->command = BATTLE_COM_ESCAPE;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
1071
battle/battle_command.c
Normal file
1071
battle/battle_command.c
Normal file
File diff suppressed because it is too large
Load Diff
10080
battle/battle_event.c
Normal file
10080
battle/battle_event.c
Normal file
File diff suppressed because it is too large
Load Diff
1154
battle/battle_item.c
Normal file
1154
battle/battle_item.c
Normal file
File diff suppressed because it is too large
Load Diff
5438
battle/battle_magic.c
Normal file
5438
battle/battle_magic.c
Normal file
File diff suppressed because it is too large
Load Diff
456
battle/makefile
Normal file
456
battle/makefile
Normal file
@ -0,0 +1,456 @@
|
||||
export CC=gcc
|
||||
export RM=rm -f
|
||||
export AR=ar cr
|
||||
export MV=mv
|
||||
export RANLIB=ranlib
|
||||
export SED=sed
|
||||
|
||||
|
||||
export SHELL=/bin/sh
|
||||
|
||||
INCFLAGS=-I.. -I../include
|
||||
|
||||
CFLAGS=-O3 -w $(INCFLAGS)
|
||||
#Pentium 4 (Intel)
|
||||
#CFLAGS=-march=pentium4 -O3 -pipe -fomit-frame-pointer $(INCFLAGS)
|
||||
#Athlon XP (AMD)
|
||||
#CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" $(INCFLAGS)
|
||||
#Athlon64£º
|
||||
#CFLAGS="-O2 -march=athlon64 -ftracer -fprefetch-loop-arrays -pipe" $(INCFLAGS)
|
||||
|
||||
PROG=libbattle.a
|
||||
|
||||
SRC=battle.c battle_event.c battle_command.c battle_ai.c battle_magic.c pet_skill.c battle_item.c profession_skill.c
|
||||
OBJ=$(SRC:.c=.o)
|
||||
|
||||
ifeq (0,$(MAKELEVEL))
|
||||
CC=gcc
|
||||
RM=rm -f
|
||||
AR=ar cr
|
||||
MV=mv
|
||||
RANLIB=ranlib
|
||||
SED=sed
|
||||
SHELL=/bin/sh
|
||||
endif
|
||||
|
||||
all: $(PROG)
|
||||
|
||||
$(PROG): $(OBJ)
|
||||
$(RM) $(PROG)
|
||||
$(AR) $(PROG) $(OBJ)
|
||||
$(RANLIB) $(PROG)
|
||||
|
||||
depend:
|
||||
$(MV) makefile makefile.bak
|
||||
$(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile
|
||||
$(CC) $(INCFLAGS) -M $(SRC) >> makefile
|
||||
|
||||
clean:
|
||||
$(RM) $(PROG)
|
||||
$(RM) $(OBJ)
|
||||
$(RM) *~
|
||||
|
||||
distclean:
|
||||
$(RM) $(PROG)
|
||||
$(RM) $(OBJ)
|
||||
$(RM) *~
|
||||
$(MV) makefile makefile.bak
|
||||
$(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile
|
||||
$(RM) makefile.bak
|
||||
|
||||
# DO NOT DELETE THIS LINE
|
||||
battle.o: battle.c ../include/version.h ../include/sasql.h \
|
||||
/usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
|
||||
/usr/include/gnu/stubs-32.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h \
|
||||
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/bits/wchar.h /usr/include/gconv.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/bits/time.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
|
||||
/usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/bits/uio.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \
|
||||
/usr/include/bits/netdb.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/string.h ../include/correct_bug.h ../include/buf.h \
|
||||
../include/common.h ../include/object.h ../include/char.h \
|
||||
../include/char_base.h ../include/version.h ../include/skill.h \
|
||||
../include/util.h ../include/title.h ../include/addressbook.h \
|
||||
../include/net.h /usr/include/signal.h /usr/include/bits/signum.h \
|
||||
/usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
|
||||
/usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
|
||||
/usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \
|
||||
/usr/include/pthread.h /usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../include/link.h ../include/lua.h \
|
||||
../include/luaconf.h ../include/lauxlib.h ../include/lualib.h \
|
||||
../include/char_data.h ../include/item.h ../include/char.h \
|
||||
../include/char_base.h ../include/char_data.h ../include/battle.h \
|
||||
../include/battle_event.h ../include/battle_command.h \
|
||||
../include/battle_ai.h ../include/configfile.h \
|
||||
../include/lssproto_serv.h ../include/lssproto_util.h \
|
||||
../include/encount.h ../include/enemy.h ../include/handletime.h \
|
||||
../include/readmap.h ../include/pet_skill.h ../include/npcutil.h \
|
||||
../include/magic.h ../include/npc_npcenemy.h ../include/log.h \
|
||||
../include/pet_skillinfo.h ../include/anim_tbl.h ../include/common.h \
|
||||
../include/battle_magic.h ../include/item.h ../include/correct_bug.h \
|
||||
../include/mylua/function.h ../include/mylua/mylua.h ../include/lua.h \
|
||||
../include/lauxlib.h ../include/lualib.h ../include/npc_autopk.h \
|
||||
../include/profession_skill.h ../include/skill.h
|
||||
battle_event.o: battle_event.c ../include/version.h ../include/sasql.h \
|
||||
/usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
|
||||
/usr/include/gnu/stubs-32.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h \
|
||||
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/bits/wchar.h /usr/include/gconv.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/bits/time.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
|
||||
/usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/bits/uio.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \
|
||||
/usr/include/bits/netdb.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/string.h ../include/correct_bug.h /usr/include/math.h \
|
||||
/usr/include/bits/huge_val.h /usr/include/bits/mathdef.h \
|
||||
/usr/include/bits/mathcalls.h ../include/char.h ../include/common.h \
|
||||
../include/char_base.h ../include/version.h ../include/skill.h \
|
||||
../include/util.h ../include/title.h ../include/addressbook.h \
|
||||
../include/net.h /usr/include/signal.h /usr/include/bits/signum.h \
|
||||
/usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
|
||||
/usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
|
||||
/usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \
|
||||
/usr/include/pthread.h /usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../include/link.h ../include/lua.h \
|
||||
../include/luaconf.h ../include/lauxlib.h ../include/lualib.h \
|
||||
../include/char_data.h ../include/item.h ../include/char.h \
|
||||
../include/char_event.h ../include/battle.h ../include/battle_event.h \
|
||||
../include/configfile.h ../include/pet.h ../include/log.h \
|
||||
../include/lssproto_serv.h ../include/lssproto_util.h \
|
||||
../include/anim_tbl.h ../include/battle_magic.h ../include/util.h \
|
||||
../include/enemy.h ../include/pet_skill.h ../include/char_base.h \
|
||||
../include/item_event.h ../include/profession_skill.h ../include/item.h \
|
||||
../include/skill.h ../include/magic_base.h ../include/mylua/function.h
|
||||
battle_command.o: battle_command.c ../include/version.h \
|
||||
../include/sasql.h /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \
|
||||
/usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h \
|
||||
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/bits/wchar.h /usr/include/gconv.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/bits/time.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
|
||||
/usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/bits/uio.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \
|
||||
/usr/include/bits/netdb.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/string.h ../include/correct_bug.h ../include/char.h \
|
||||
../include/common.h ../include/char_base.h ../include/version.h \
|
||||
../include/skill.h ../include/util.h ../include/title.h \
|
||||
../include/addressbook.h ../include/net.h /usr/include/signal.h \
|
||||
/usr/include/bits/signum.h /usr/include/bits/siginfo.h \
|
||||
/usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
|
||||
/usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \
|
||||
/usr/include/bits/sigthread.h /usr/include/pthread.h \
|
||||
/usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../include/link.h ../include/lua.h \
|
||||
../include/luaconf.h ../include/lauxlib.h ../include/lualib.h \
|
||||
../include/char_data.h ../include/item.h ../include/char.h \
|
||||
../include/char_base.h ../include/battle.h ../include/pet_skill.h \
|
||||
../include/battle_event.h ../include/battle_command.h \
|
||||
../include/lssproto_serv.h ../include/lssproto_util.h \
|
||||
../include/magic.h ../include/magic_base.h ../include/handletime.h \
|
||||
../include/profession_skill.h
|
||||
battle_ai.o: battle_ai.c ../include/version.h ../include/sasql.h \
|
||||
/usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
|
||||
/usr/include/gnu/stubs-32.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h \
|
||||
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/bits/wchar.h /usr/include/gconv.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/bits/time.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
|
||||
/usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/bits/uio.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \
|
||||
/usr/include/bits/netdb.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/string.h ../include/correct_bug.h ../include/common.h \
|
||||
../include/char.h ../include/common.h ../include/char_base.h \
|
||||
../include/version.h ../include/skill.h ../include/util.h \
|
||||
../include/title.h ../include/addressbook.h ../include/net.h \
|
||||
/usr/include/signal.h /usr/include/bits/signum.h \
|
||||
/usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
|
||||
/usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
|
||||
/usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \
|
||||
/usr/include/pthread.h /usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../include/link.h ../include/lua.h \
|
||||
../include/luaconf.h ../include/lauxlib.h ../include/lualib.h \
|
||||
../include/char_data.h ../include/item.h ../include/char.h \
|
||||
../include/char_base.h ../include/battle.h ../include/npcutil.h \
|
||||
../include/pet_skill.h
|
||||
battle_magic.o: battle_magic.c ../include/version.h ../include/sasql.h \
|
||||
/usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
|
||||
/usr/include/gnu/stubs-32.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h \
|
||||
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/bits/wchar.h /usr/include/gconv.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/bits/time.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
|
||||
/usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/bits/uio.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \
|
||||
/usr/include/bits/netdb.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/string.h ../include/correct_bug.h ../include/char.h \
|
||||
../include/common.h ../include/char_base.h ../include/version.h \
|
||||
../include/skill.h ../include/util.h ../include/title.h \
|
||||
../include/addressbook.h ../include/net.h /usr/include/signal.h \
|
||||
/usr/include/bits/signum.h /usr/include/bits/siginfo.h \
|
||||
/usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
|
||||
/usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \
|
||||
/usr/include/bits/sigthread.h /usr/include/pthread.h \
|
||||
/usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../include/link.h ../include/lua.h \
|
||||
../include/luaconf.h ../include/lauxlib.h ../include/lualib.h \
|
||||
../include/char_data.h ../include/item.h ../include/char.h \
|
||||
../include/char_base.h ../include/battle.h ../include/battle_event.h \
|
||||
../include/magic_base.h ../include/battle_magic.h \
|
||||
../include/item_event.h ../include/anim_tbl.h ../include/common.h \
|
||||
../include/lssproto_serv.h ../include/lssproto_util.h \
|
||||
../include/profession_skill.h ../include/skill.h
|
||||
pet_skill.o: pet_skill.c ../include/version.h ../include/sasql.h \
|
||||
/usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
|
||||
/usr/include/gnu/stubs-32.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h \
|
||||
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/bits/wchar.h /usr/include/gconv.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/bits/time.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
|
||||
/usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/bits/uio.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \
|
||||
/usr/include/bits/netdb.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/string.h ../include/correct_bug.h ../include/common.h \
|
||||
../include/buf.h ../include/common.h ../include/configfile.h \
|
||||
../include/char_base.h ../include/version.h ../include/skill.h \
|
||||
../include/util.h ../include/title.h ../include/addressbook.h \
|
||||
../include/net.h /usr/include/signal.h /usr/include/bits/signum.h \
|
||||
/usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
|
||||
/usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
|
||||
/usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \
|
||||
/usr/include/pthread.h /usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../include/link.h ../include/lua.h \
|
||||
../include/luaconf.h ../include/lauxlib.h ../include/lualib.h \
|
||||
../include/char_data.h ../include/item.h ../include/char.h \
|
||||
../include/char_base.h ../include/char_data.h ../include/pet_skill.h \
|
||||
../include/battle.h ../include/battle_event.h ../include/battle_magic.h \
|
||||
../include/item.h ../include/item_gen.h ../include/char_talk.h
|
||||
battle_item.o: battle_item.c ../include/version.h ../include/sasql.h \
|
||||
/usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
|
||||
/usr/include/gnu/stubs-32.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h \
|
||||
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/bits/wchar.h /usr/include/gconv.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/bits/time.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
|
||||
/usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/bits/uio.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \
|
||||
/usr/include/bits/netdb.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/string.h ../include/correct_bug.h ../include/char.h \
|
||||
../include/common.h ../include/char_base.h ../include/version.h \
|
||||
../include/skill.h ../include/util.h ../include/title.h \
|
||||
../include/addressbook.h ../include/net.h /usr/include/signal.h \
|
||||
/usr/include/bits/signum.h /usr/include/bits/siginfo.h \
|
||||
/usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
|
||||
/usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \
|
||||
/usr/include/bits/sigthread.h /usr/include/pthread.h \
|
||||
/usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../include/link.h ../include/lua.h \
|
||||
../include/luaconf.h ../include/lauxlib.h ../include/lualib.h \
|
||||
../include/char_data.h ../include/item.h ../include/char.h \
|
||||
../include/char_base.h ../include/battle.h ../include/battle_event.h \
|
||||
../include/battle_item.h ../include/battle_magic.h \
|
||||
../include/item_event.h ../include/log.h ../include/anim_tbl.h \
|
||||
../include/npcutil.h ../include/magic_base.h ../include/lssproto_serv.h \
|
||||
../include/lssproto_util.h
|
||||
profession_skill.o: profession_skill.c ../include/version.h \
|
||||
../include/sasql.h /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \
|
||||
/usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h \
|
||||
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/bits/wchar.h /usr/include/gconv.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/bits/time.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
|
||||
/usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/bits/uio.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \
|
||||
/usr/include/bits/netdb.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/string.h ../include/correct_bug.h ../include/buf.h \
|
||||
../include/common.h ../include/profession_skill.h ../include/version.h \
|
||||
../include/util.h ../include/skill.h ../include/char_base.h \
|
||||
../include/title.h ../include/addressbook.h ../include/net.h \
|
||||
/usr/include/signal.h /usr/include/bits/signum.h \
|
||||
/usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
|
||||
/usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
|
||||
/usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \
|
||||
/usr/include/pthread.h /usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../include/link.h ../include/lua.h \
|
||||
../include/luaconf.h ../include/lauxlib.h ../include/lualib.h \
|
||||
../include/battle.h ../include/magic_base.h ../include/configfile.h \
|
||||
../include/char.h ../include/char_base.h ../include/char_data.h \
|
||||
../include/item.h ../include/char.h ../include/lssproto_serv.h \
|
||||
../include/lssproto_util.h ../include/skill.h
|
456
battle/makefile.bak
Normal file
456
battle/makefile.bak
Normal file
@ -0,0 +1,456 @@
|
||||
export CC=gcc
|
||||
export RM=rm -f
|
||||
export AR=ar cr
|
||||
export MV=mv
|
||||
export RANLIB=ranlib
|
||||
export SED=sed
|
||||
|
||||
|
||||
export SHELL=/bin/sh
|
||||
|
||||
INCFLAGS=-I.. -I../include
|
||||
|
||||
CFLAGS=-O3 -w $(INCFLAGS)
|
||||
#Pentium 4 (Intel)
|
||||
#CFLAGS=-march=pentium4 -O3 -pipe -fomit-frame-pointer $(INCFLAGS)
|
||||
#Athlon XP (AMD)
|
||||
#CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" $(INCFLAGS)
|
||||
#Athlon64£º
|
||||
#CFLAGS="-O2 -march=athlon64 -ftracer -fprefetch-loop-arrays -pipe" $(INCFLAGS)
|
||||
|
||||
PROG=libbattle.a
|
||||
|
||||
SRC=battle.c battle_event.c battle_command.c battle_ai.c battle_magic.c pet_skill.c battle_item.c profession_skill.c
|
||||
OBJ=$(SRC:.c=.o)
|
||||
|
||||
ifeq (0,$(MAKELEVEL))
|
||||
CC=gcc
|
||||
RM=rm -f
|
||||
AR=ar cr
|
||||
MV=mv
|
||||
RANLIB=ranlib
|
||||
SED=sed
|
||||
SHELL=/bin/sh
|
||||
endif
|
||||
|
||||
all: $(PROG)
|
||||
|
||||
$(PROG): $(OBJ)
|
||||
$(RM) $(PROG)
|
||||
$(AR) $(PROG) $(OBJ)
|
||||
$(RANLIB) $(PROG)
|
||||
|
||||
depend:
|
||||
$(MV) makefile makefile.bak
|
||||
$(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile
|
||||
$(CC) $(INCFLAGS) -M $(SRC) >> makefile
|
||||
|
||||
clean:
|
||||
$(RM) $(PROG)
|
||||
$(RM) $(OBJ)
|
||||
$(RM) *~
|
||||
|
||||
distclean:
|
||||
$(RM) $(PROG)
|
||||
$(RM) $(OBJ)
|
||||
$(RM) *~
|
||||
$(MV) makefile makefile.bak
|
||||
$(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile
|
||||
$(RM) makefile.bak
|
||||
|
||||
# DO NOT DELETE THIS LINE
|
||||
battle.o: battle.c ../include/version.h ../include/sasql.h \
|
||||
/usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
|
||||
/usr/include/gnu/stubs-32.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h \
|
||||
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/bits/wchar.h /usr/include/gconv.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/bits/time.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
|
||||
/usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/bits/uio.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \
|
||||
/usr/include/bits/netdb.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/string.h ../include/correct_bug.h ../include/buf.h \
|
||||
../include/common.h ../include/object.h ../include/char.h \
|
||||
../include/char_base.h ../include/version.h ../include/skill.h \
|
||||
../include/util.h ../include/title.h ../include/addressbook.h \
|
||||
../include/net.h /usr/include/signal.h /usr/include/bits/signum.h \
|
||||
/usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
|
||||
/usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
|
||||
/usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \
|
||||
/usr/include/pthread.h /usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../include/link.h ../include/lua.h \
|
||||
../include/luaconf.h ../include/lauxlib.h ../include/lualib.h \
|
||||
../include/char_data.h ../include/item.h ../include/char.h \
|
||||
../include/char_base.h ../include/char_data.h ../include/battle.h \
|
||||
../include/battle_event.h ../include/battle_command.h \
|
||||
../include/battle_ai.h ../include/configfile.h \
|
||||
../include/lssproto_serv.h ../include/lssproto_util.h \
|
||||
../include/encount.h ../include/enemy.h ../include/handletime.h \
|
||||
../include/readmap.h ../include/pet_skill.h ../include/npcutil.h \
|
||||
../include/magic.h ../include/npc_npcenemy.h ../include/log.h \
|
||||
../include/pet_skillinfo.h ../include/anim_tbl.h ../include/common.h \
|
||||
../include/battle_magic.h ../include/item.h ../include/correct_bug.h \
|
||||
../include/mylua/function.h ../include/mylua/mylua.h ../include/lua.h \
|
||||
../include/lauxlib.h ../include/lualib.h ../include/npc_autopk.h \
|
||||
../include/profession_skill.h ../include/skill.h
|
||||
battle_event.o: battle_event.c ../include/version.h ../include/sasql.h \
|
||||
/usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
|
||||
/usr/include/gnu/stubs-32.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h \
|
||||
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/bits/wchar.h /usr/include/gconv.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/bits/time.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
|
||||
/usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/bits/uio.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \
|
||||
/usr/include/bits/netdb.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/string.h ../include/correct_bug.h /usr/include/math.h \
|
||||
/usr/include/bits/huge_val.h /usr/include/bits/mathdef.h \
|
||||
/usr/include/bits/mathcalls.h ../include/char.h ../include/common.h \
|
||||
../include/char_base.h ../include/version.h ../include/skill.h \
|
||||
../include/util.h ../include/title.h ../include/addressbook.h \
|
||||
../include/net.h /usr/include/signal.h /usr/include/bits/signum.h \
|
||||
/usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
|
||||
/usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
|
||||
/usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \
|
||||
/usr/include/pthread.h /usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../include/link.h ../include/lua.h \
|
||||
../include/luaconf.h ../include/lauxlib.h ../include/lualib.h \
|
||||
../include/char_data.h ../include/item.h ../include/char.h \
|
||||
../include/char_event.h ../include/battle.h ../include/battle_event.h \
|
||||
../include/configfile.h ../include/pet.h ../include/log.h \
|
||||
../include/lssproto_serv.h ../include/lssproto_util.h \
|
||||
../include/anim_tbl.h ../include/battle_magic.h ../include/util.h \
|
||||
../include/enemy.h ../include/pet_skill.h ../include/char_base.h \
|
||||
../include/item_event.h ../include/profession_skill.h ../include/item.h \
|
||||
../include/skill.h ../include/magic_base.h ../include/mylua/function.h
|
||||
battle_command.o: battle_command.c ../include/version.h \
|
||||
../include/sasql.h /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \
|
||||
/usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h \
|
||||
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/bits/wchar.h /usr/include/gconv.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/bits/time.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
|
||||
/usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/bits/uio.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \
|
||||
/usr/include/bits/netdb.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/string.h ../include/correct_bug.h ../include/char.h \
|
||||
../include/common.h ../include/char_base.h ../include/version.h \
|
||||
../include/skill.h ../include/util.h ../include/title.h \
|
||||
../include/addressbook.h ../include/net.h /usr/include/signal.h \
|
||||
/usr/include/bits/signum.h /usr/include/bits/siginfo.h \
|
||||
/usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
|
||||
/usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \
|
||||
/usr/include/bits/sigthread.h /usr/include/pthread.h \
|
||||
/usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../include/link.h ../include/lua.h \
|
||||
../include/luaconf.h ../include/lauxlib.h ../include/lualib.h \
|
||||
../include/char_data.h ../include/item.h ../include/char.h \
|
||||
../include/char_base.h ../include/battle.h ../include/pet_skill.h \
|
||||
../include/battle_event.h ../include/battle_command.h \
|
||||
../include/lssproto_serv.h ../include/lssproto_util.h \
|
||||
../include/magic.h ../include/magic_base.h ../include/handletime.h \
|
||||
../include/profession_skill.h
|
||||
battle_ai.o: battle_ai.c ../include/version.h ../include/sasql.h \
|
||||
/usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
|
||||
/usr/include/gnu/stubs-32.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h \
|
||||
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/bits/wchar.h /usr/include/gconv.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/bits/time.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
|
||||
/usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/bits/uio.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \
|
||||
/usr/include/bits/netdb.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/string.h ../include/correct_bug.h ../include/common.h \
|
||||
../include/char.h ../include/common.h ../include/char_base.h \
|
||||
../include/version.h ../include/skill.h ../include/util.h \
|
||||
../include/title.h ../include/addressbook.h ../include/net.h \
|
||||
/usr/include/signal.h /usr/include/bits/signum.h \
|
||||
/usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
|
||||
/usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
|
||||
/usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \
|
||||
/usr/include/pthread.h /usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../include/link.h ../include/lua.h \
|
||||
../include/luaconf.h ../include/lauxlib.h ../include/lualib.h \
|
||||
../include/char_data.h ../include/item.h ../include/char.h \
|
||||
../include/char_base.h ../include/battle.h ../include/npcutil.h \
|
||||
../include/pet_skill.h
|
||||
battle_magic.o: battle_magic.c ../include/version.h ../include/sasql.h \
|
||||
/usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
|
||||
/usr/include/gnu/stubs-32.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h \
|
||||
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/bits/wchar.h /usr/include/gconv.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/bits/time.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
|
||||
/usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/bits/uio.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \
|
||||
/usr/include/bits/netdb.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/string.h ../include/correct_bug.h ../include/char.h \
|
||||
../include/common.h ../include/char_base.h ../include/version.h \
|
||||
../include/skill.h ../include/util.h ../include/title.h \
|
||||
../include/addressbook.h ../include/net.h /usr/include/signal.h \
|
||||
/usr/include/bits/signum.h /usr/include/bits/siginfo.h \
|
||||
/usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
|
||||
/usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \
|
||||
/usr/include/bits/sigthread.h /usr/include/pthread.h \
|
||||
/usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../include/link.h ../include/lua.h \
|
||||
../include/luaconf.h ../include/lauxlib.h ../include/lualib.h \
|
||||
../include/char_data.h ../include/item.h ../include/char.h \
|
||||
../include/char_base.h ../include/battle.h ../include/battle_event.h \
|
||||
../include/magic_base.h ../include/battle_magic.h \
|
||||
../include/item_event.h ../include/anim_tbl.h ../include/common.h \
|
||||
../include/lssproto_serv.h ../include/lssproto_util.h \
|
||||
../include/profession_skill.h ../include/skill.h
|
||||
pet_skill.o: pet_skill.c ../include/version.h ../include/sasql.h \
|
||||
/usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
|
||||
/usr/include/gnu/stubs-32.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h \
|
||||
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/bits/wchar.h /usr/include/gconv.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/bits/time.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
|
||||
/usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/bits/uio.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \
|
||||
/usr/include/bits/netdb.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/string.h ../include/correct_bug.h ../include/common.h \
|
||||
../include/buf.h ../include/common.h ../include/configfile.h \
|
||||
../include/char_base.h ../include/version.h ../include/skill.h \
|
||||
../include/util.h ../include/title.h ../include/addressbook.h \
|
||||
../include/net.h /usr/include/signal.h /usr/include/bits/signum.h \
|
||||
/usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
|
||||
/usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
|
||||
/usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \
|
||||
/usr/include/pthread.h /usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../include/link.h ../include/lua.h \
|
||||
../include/luaconf.h ../include/lauxlib.h ../include/lualib.h \
|
||||
../include/char_data.h ../include/item.h ../include/char.h \
|
||||
../include/char_base.h ../include/char_data.h ../include/pet_skill.h \
|
||||
../include/battle.h ../include/battle_event.h ../include/battle_magic.h \
|
||||
../include/item.h ../include/item_gen.h ../include/char_talk.h
|
||||
battle_item.o: battle_item.c ../include/version.h ../include/sasql.h \
|
||||
/usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
|
||||
/usr/include/gnu/stubs-32.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h \
|
||||
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/bits/wchar.h /usr/include/gconv.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/bits/time.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
|
||||
/usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/bits/uio.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \
|
||||
/usr/include/bits/netdb.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/string.h ../include/correct_bug.h ../include/char.h \
|
||||
../include/common.h ../include/char_base.h ../include/version.h \
|
||||
../include/skill.h ../include/util.h ../include/title.h \
|
||||
../include/addressbook.h ../include/net.h /usr/include/signal.h \
|
||||
/usr/include/bits/signum.h /usr/include/bits/siginfo.h \
|
||||
/usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
|
||||
/usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \
|
||||
/usr/include/bits/sigthread.h /usr/include/pthread.h \
|
||||
/usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../include/link.h ../include/lua.h \
|
||||
../include/luaconf.h ../include/lauxlib.h ../include/lualib.h \
|
||||
../include/char_data.h ../include/item.h ../include/char.h \
|
||||
../include/char_base.h ../include/battle.h ../include/battle_event.h \
|
||||
../include/battle_item.h ../include/battle_magic.h \
|
||||
../include/item_event.h ../include/log.h ../include/anim_tbl.h \
|
||||
../include/npcutil.h ../include/magic_base.h ../include/lssproto_serv.h \
|
||||
../include/lssproto_util.h
|
||||
profession_skill.o: profession_skill.c ../include/version.h \
|
||||
../include/sasql.h /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \
|
||||
/usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h \
|
||||
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/include/bits/wchar.h /usr/include/gconv.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/bits/time.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
|
||||
/usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/bits/uio.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h \
|
||||
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \
|
||||
/usr/include/bits/netdb.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/string.h ../include/correct_bug.h ../include/buf.h \
|
||||
../include/common.h ../include/profession_skill.h ../include/version.h \
|
||||
../include/util.h ../include/skill.h ../include/char_base.h \
|
||||
../include/title.h ../include/addressbook.h ../include/net.h \
|
||||
/usr/include/signal.h /usr/include/bits/signum.h \
|
||||
/usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
|
||||
/usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
|
||||
/usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \
|
||||
/usr/include/pthread.h /usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../include/link.h ../include/lua.h \
|
||||
../include/luaconf.h ../include/lauxlib.h ../include/lualib.h \
|
||||
../include/battle.h ../include/magic_base.h ../include/configfile.h \
|
||||
../include/char.h ../include/char_base.h ../include/char_data.h \
|
||||
../include/item.h ../include/char.h ../include/lssproto_serv.h \
|
||||
../include/lssproto_util.h ../include/skill.h
|
2744
battle/pet_skill.c
Normal file
2744
battle/pet_skill.c
Normal file
File diff suppressed because it is too large
Load Diff
1393
battle/profession_skill.c
Normal file
1393
battle/profession_skill.c
Normal file
File diff suppressed because it is too large
Load Diff
BIN
battle/stoRkxhg
Normal file
BIN
battle/stoRkxhg
Normal file
Binary file not shown.
192
buf.c
Normal file
192
buf.c
Normal file
@ -0,0 +1,192 @@
|
||||
#define __BUF_C__
|
||||
#include "version.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "buf.h"
|
||||
#include "handletime.h"
|
||||
|
||||
static int UNIT;
|
||||
static int UNITNUMBER;
|
||||
static int memconfig;
|
||||
static int readblock;
|
||||
static int NowMemory;
|
||||
static struct timeval AllocOldTime;
|
||||
|
||||
typedef struct tagMemory
|
||||
{
|
||||
char* pointer;
|
||||
BOOL used;
|
||||
|
||||
unsigned int nsize;
|
||||
}Memory;
|
||||
static Memory *mem;
|
||||
|
||||
|
||||
void memEnd( void )
|
||||
{
|
||||
if( mem != NULL && mem[0].pointer != NULL ){
|
||||
free(mem[0].pointer);
|
||||
free(mem);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL configmem( int unit , int unitnumber )
|
||||
{
|
||||
if( memconfig == TRUE )
|
||||
return FALSE;
|
||||
UNIT = unit;
|
||||
UNITNUMBER = unitnumber;
|
||||
if( UNIT <= 0 || UNITNUMBER <= 0 )
|
||||
return memconfig = FALSE;
|
||||
return memconfig = TRUE;
|
||||
}
|
||||
|
||||
BOOL memInit( void )
|
||||
{
|
||||
int i;
|
||||
if( memconfig == FALSE )
|
||||
return FALSE;
|
||||
mem = calloc( 1, sizeof( Memory ) * UNITNUMBER );
|
||||
if( mem == NULL ){
|
||||
print( "memInit: Can't alloc memory: %d\n" ,
|
||||
sizeof(Memory)*UNITNUMBER );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
memset( mem , 0 , sizeof( Memory )* UNITNUMBER );
|
||||
for( i = 0 ; i < UNITNUMBER ; i ++ ){
|
||||
mem[i].pointer = NULL;
|
||||
mem[i].used = FALSE;
|
||||
mem[i].nsize = 0;
|
||||
}
|
||||
mem[0].pointer = calloc( 1, UNIT*UNITNUMBER );
|
||||
if( mem[0].pointer == NULL ){
|
||||
print( "不可分配 %d byte\n" , UNIT*UNITNUMBER );
|
||||
free( mem );
|
||||
return FALSE;
|
||||
}
|
||||
memset( mem[0].pointer , 0 , sizeof( UNIT*UNITNUMBER ));
|
||||
print( "内存已分配 %.2f MB..." ,UNIT*UNITNUMBER/1024.0/1024.0);
|
||||
#ifdef DEBUG
|
||||
print( "Allocate %d byte( %.2fK byte %.2fM byte )\n" ,
|
||||
UNIT*UNITNUMBER,
|
||||
UNIT*UNITNUMBER/1024.0,
|
||||
UNIT*UNITNUMBER/1024.0/1024.0
|
||||
);
|
||||
#endif
|
||||
readblock = 0;
|
||||
for( i = 0 ; i < UNITNUMBER ; i ++ )
|
||||
mem[i].pointer = mem[0].pointer + i * UNIT;
|
||||
|
||||
NowMemory = 0;
|
||||
AllocOldTime.tv_sec = NowTime.tv_sec;
|
||||
AllocOldTime.tv_usec = NowTime.tv_usec;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void* allocateMemory( const unsigned int nbyte )
|
||||
{
|
||||
int i;
|
||||
int arrayAllocSize;
|
||||
BOOL flg = FALSE;
|
||||
void *ret;
|
||||
int first = 0;
|
||||
|
||||
arrayAllocSize = nbyte/UNIT + ( nbyte%UNIT ? 1 : 0 );
|
||||
if( arrayAllocSize == 0 )return NULL;
|
||||
#ifdef DEBUG
|
||||
debug( arrayAllocSize , d );
|
||||
printf("(%.2f KB)\n",nbyte/1024.0);
|
||||
#endif
|
||||
i = readblock;
|
||||
while( 1 ) {
|
||||
if( i > UNITNUMBER - arrayAllocSize) {
|
||||
i = 0;
|
||||
}
|
||||
if( mem[i].used != FALSE ){
|
||||
i += mem[i].nsize;
|
||||
}else{
|
||||
int j;
|
||||
BOOL found = TRUE;
|
||||
for( j = i; j < i + arrayAllocSize; j ++ ) {
|
||||
if( mem[j].used != FALSE ){
|
||||
i = j + mem[j].nsize;
|
||||
found = FALSE;
|
||||
if( first == 0 ) first = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( found ) {
|
||||
mem[i].used=TRUE;
|
||||
mem[i].nsize = arrayAllocSize;
|
||||
readblock = i + arrayAllocSize;
|
||||
ret = mem[i].pointer;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( ( i >= readblock || i > UNITNUMBER - arrayAllocSize )
|
||||
&& flg == TRUE ) {
|
||||
ret = NULL;
|
||||
break;
|
||||
}
|
||||
if( i > UNITNUMBER - arrayAllocSize) {
|
||||
i = 0;
|
||||
flg = TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
if( ret == NULL ) {
|
||||
print( "Can't Allocate %d byte .remnants:%4.2f\n" , nbyte, (float)(NowMemory/UNITNUMBER));
|
||||
}else {
|
||||
NowMemory += arrayAllocSize;
|
||||
|
||||
if( NowTime.tv_sec > AllocOldTime.tv_sec +10 ) {
|
||||
print( "\n");
|
||||
if( NowMemory > (double)UNITNUMBER * 0.9) {
|
||||
print( "Warning!! Memory use rate exceeded 90%% .remnants:%d\n", UNITNUMBER-NowMemory);
|
||||
}else if( NowMemory > (double)UNITNUMBER * 0.8) {
|
||||
print( "Warning!! Memory use rate exceeded 80%% .remnants:%d\n", UNITNUMBER-NowMemory);
|
||||
}else if( NowMemory > (double)UNITNUMBER * 0.7) {
|
||||
print( "Memory use rate exceeded 70%% .remnants:%d\n", UNITNUMBER-NowMemory);
|
||||
}
|
||||
memcpy( &AllocOldTime, &NowTime, sizeof( AllocOldTime));
|
||||
}
|
||||
//print( "NowMemory.remnants:%4.2f\n", (float)(UNITNUMBER-NowMemory)/UNITNUMBER);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*------------------------------------------------------------
|
||||
* 娄醒
|
||||
* 忒曰袄
|
||||
* 卅仄
|
||||
------------------------------------------------------------*/
|
||||
void freeMemory( void* freepointer )
|
||||
{
|
||||
int arrayindex;
|
||||
char* toppointer;
|
||||
toppointer = mem[0].pointer;
|
||||
if( freepointer == NULL )return;
|
||||
arrayindex = ((int)freepointer-(int)toppointer)/UNIT;
|
||||
if( arrayindex < readblock) {
|
||||
readblock = arrayindex;
|
||||
}
|
||||
mem[arrayindex].used = FALSE;
|
||||
|
||||
NowMemory -= mem[arrayindex].nsize;
|
||||
|
||||
}
|
||||
|
||||
void showMem( char *buf)
|
||||
{
|
||||
sprintf( buf, "NowMemory.remnants:%d%%", ((UNITNUMBER-NowMemory)*100)/UNITNUMBER);
|
||||
printf( "\n" );
|
||||
printf( buf );
|
||||
}
|
||||
|
1676
callfromac.c
Normal file
1676
callfromac.c
Normal file
File diff suppressed because it is too large
Load Diff
4736
callfromcli.c
Normal file
4736
callfromcli.c
Normal file
File diff suppressed because it is too large
Load Diff
914
char/addressbook.c
Normal file
914
char/addressbook.c
Normal file
@ -0,0 +1,914 @@
|
||||
#define __ADDRESSBOOK_C_
|
||||
#include "version.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
|
||||
#include "addressbook.h"
|
||||
#include "char.h"
|
||||
#include "handletime.h"
|
||||
#include "buf.h"
|
||||
#include "net.h"
|
||||
#include "lssproto_serv.h"
|
||||
#include "saacproto_cli.h"
|
||||
#include "object.h"
|
||||
#include "battle.h"
|
||||
#include "configfile.h"
|
||||
#include "npcutil.h"
|
||||
#include "pet.h"
|
||||
#include "petmail.h"
|
||||
#include "log.h"
|
||||
|
||||
/*裔烂丢永本□斥及 赢赢今[票匹烂聒允月 侬 及赢今反
|
||||
仇木动票卞允月仇午*/
|
||||
#define ADDRESSBOOK_FIXEDMESSAGE_MAXLEN 128
|
||||
|
||||
/* 愤坌及蟆卞簿手中卅井匀凶及匹}失玉伊旦皮永弁卞馨笛匹五卅井匀凶
|
||||
午五及裔烂丢永本□斥 */
|
||||
#define ADDRESSBOOK_CANTADD "那里没有任何人。"
|
||||
#define ADDRESSBOOK_CANTADD2 "无法交换名片。"
|
||||
|
||||
/* 簿井毛笛尹月仇午互匹五凶午五}笛尹方丹午仄凶谛卞霜耨允月丢永本□斥*/
|
||||
#define ADDRESSBOOK_ADDED "和%s交换名片 。"
|
||||
|
||||
/* 簿井卞涌毛创尹日木凶日 */
|
||||
#define ADDRESSBOOK_BEINGADDED "和%s交换名片 。"
|
||||
|
||||
/* 巨件玄伉互中匀天中分匀凶午五及丢永本□斥 */
|
||||
#define ADDRESSBOOK_MYTABLEFULL "名片匣已满。"
|
||||
|
||||
/* 锹澎及巨件玄伉互中匀天中分匀凶午五及丢永本□斥 */
|
||||
#define ADDRESSBOOK_HISTABLEFULL "对方的名片匣已满。"
|
||||
|
||||
|
||||
/* 丢永本□斥毛霜耨允月及卞岳 仄凶午五 */
|
||||
#define ADDRESSBOOK_SENT "送信给%s 。"
|
||||
|
||||
/* 丢永本□斥毛霜耨允月及卞撩 仄凶午五 */
|
||||
#define ADDRESSBOOK_UNSENT "无法送信给%s 。"
|
||||
|
||||
/* 簿井毛创尹方丹午仄凶互}湃卞创尹化中凶 */
|
||||
#define ADDRESSBOOK_ALREADYADDED "已经和%s交换过名片了。 "
|
||||
|
||||
/* 铜毛域 读卞 丹橇谪 */
|
||||
#define ADDRESSBOOK_GIVEADDRESS "从%s得到名片。"
|
||||
|
||||
/* 铜毛域 读卞丐仆月橇谪 */
|
||||
#define ADDRESSBOOK_TAKEADDRESS1 "给%s自己的名片。"
|
||||
/* 铜毛域 读卞丐仆月橇谪 */
|
||||
#define ADDRESSBOOK_TAKEADDRESS2 "因为%s想要名片,所以将名片给他了。"
|
||||
|
||||
#define ADDRESSBOOK_RETURNED1 \
|
||||
"从%s寄来信件,但由於没有%s的名片又将信件退回。"
|
||||
|
||||
#define ADDRESSBOOK_RETURNED2 \
|
||||
"寄信件给%s,但由於%s 没有名片,所以信件又被退回来了。"
|
||||
|
||||
#define PETMAIL_RETURNED1 \
|
||||
"%s不在这个世界里,所以无法寄送信件给他。"
|
||||
|
||||
|
||||
/* static匹银丹迕[ 五中袄手*/
|
||||
char ADDRESSBOOK_returnstring[25*128];
|
||||
|
||||
|
||||
|
||||
static int ADDRESSBOOK_findBlankEntry( int cindex );
|
||||
static BOOL ADDRESSBOOK_makeEntryFromCharaindex( int charaindex,
|
||||
ADDRESSBOOK_entry* ae);
|
||||
|
||||
/*------------------------------------------------------------
|
||||
* 失玉伊旦皮永弁及丢永本□斥毛霜耨允月
|
||||
* MSG皿夫玄戊伙井日勾井歹木月[
|
||||
*
|
||||
* 支月仇午反}connection井日cdkey匹腹绸仄化}平乓仿 手
|
||||
* 甲永玄仄凶日} MSG_send允月[公及午五卞}愤坌及树 互
|
||||
* 锹澎及伉旦玄卞卅井匀凶日窒手仄卅中午中丹仇午分[
|
||||
* 娄醒
|
||||
* cindex int 平乓仿及index
|
||||
* aindex int 失玉伊旦皮永弁及index
|
||||
* text char* 霜耨允月 侬
|
||||
* color int 缙
|
||||
* 忒曰袄
|
||||
* 左件仿奶件及平乓仿卞丢永本□斥毛霜耨仄凶日TRUE ,
|
||||
* 左白仿奶件卞瓒 仄凶日FALSE毛井尹允
|
||||
------------------------------------------------------------*/
|
||||
BOOL ADDRESSBOOK_sendMessage( int cindex, int aindex, char* text , int color )
|
||||
{
|
||||
int i ;
|
||||
char tmpmsg[256];
|
||||
char textbuffer[2048];
|
||||
char *mycd;
|
||||
char *mycharaname = CHAR_getChar(cindex,CHAR_NAME );
|
||||
struct tm tm1;
|
||||
ADDRESSBOOK_entry *ae;
|
||||
int playernum = CHAR_getPlayerMaxNum();
|
||||
|
||||
if( !CHAR_CHECKINDEX(cindex) )return FALSE;
|
||||
|
||||
ae = CHAR_getAddressbookEntry( cindex , aindex );
|
||||
if( ae == NULL )return FALSE;
|
||||
#ifdef _AVOIDATTACK_IN_ADDRESSBOOK_sendMessage_textToLong
|
||||
if( strlen(text) > 256 )
|
||||
return FALSE;
|
||||
#endif
|
||||
//getcdkeyFromCharaIndex(cindex, mycd,sizeof(mycd) );
|
||||
mycd = CHAR_getChar( cindex, CHAR_CDKEY);
|
||||
|
||||
memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1));
|
||||
|
||||
snprintf( textbuffer, sizeof( textbuffer),
|
||||
"%2d/%02d %2d:%02d|%s|-1",
|
||||
tm1.tm_mon +1, tm1.tm_mday, tm1.tm_hour, tm1.tm_min,
|
||||
text);
|
||||
|
||||
/* 扔□田□ 卞中月凛 */
|
||||
for( i = 0 ; i < playernum ; i ++){
|
||||
if( CHAR_CHECKINDEX( i) &&
|
||||
strcmp( CHAR_getChar( i, CHAR_CDKEY), ae->cdkey) == 0 &&
|
||||
strcmp( CHAR_getChar( i, CHAR_NAME), ae->charname) == 0 )
|
||||
{
|
||||
/*
|
||||
* CDKEY 手 平乓仿 手域谯仄凶[公及平乓仿弁正及
|
||||
* 失玉伊旦皮永弁卞愤坌及树 互丐月井譬屯化}
|
||||
* 绣箕仄凶日}MSG允月[
|
||||
*/
|
||||
int index_to_my_info =
|
||||
ADDRESSBOOK_getIndexInAddressbook( i ,
|
||||
mycd, mycharaname);
|
||||
|
||||
int fd;
|
||||
if( index_to_my_info < 0 ){
|
||||
/*
|
||||
* 锹澎互愤坌毛坫壅仄化仄引匀化月[
|
||||
* 域杀 谛卞]丢□伙互 凶午分仃骚襞允月[
|
||||
*/
|
||||
//snprintf( tmpmsg, sizeof( tmpmsg),
|
||||
// ADDRESSBOOK_RETURNED1,
|
||||
// ae->charname
|
||||
// );
|
||||
|
||||
//CHAR_talkToCli( CONNECT_getCharaindex(i), -1,
|
||||
// tmpmsg , CHAR_COLORYELLOW );
|
||||
|
||||
snprintf( tmpmsg, sizeof( tmpmsg),
|
||||
ADDRESSBOOK_RETURNED2,
|
||||
CHAR_getChar( i, CHAR_NAME),
|
||||
CHAR_getChar( i, CHAR_NAME));
|
||||
|
||||
/* 霜曰潜卞手丢永本□斥 */
|
||||
CHAR_talkToCli( cindex, -1,
|
||||
tmpmsg , CHAR_COLORYELLOW );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
fd = getfdFromCharaIndex( i);
|
||||
if( fd != -1 ) {
|
||||
lssproto_MSG_send( fd , index_to_my_info , textbuffer , color );
|
||||
/* 夫弘午曰 */
|
||||
printl( LOG_TALK, "CD=%s\tNM=%s\tT=%s" , mycd, mycharaname, textbuffer );
|
||||
|
||||
}
|
||||
|
||||
snprintf( tmpmsg , sizeof( tmpmsg),ADDRESSBOOK_SENT,
|
||||
ae->charname );
|
||||
CHAR_talkToCli(cindex,-1, tmpmsg , color );
|
||||
|
||||
// WON ADD 修正snprintf会导致当机的bug
|
||||
{
|
||||
char tmp[1000];
|
||||
sprintf( tmp , "ADDRESSBOOK_sendMessage:"
|
||||
"Send MSG to: %s %s\n",
|
||||
ae->cdkey , ae->charname );
|
||||
// print( tmp );
|
||||
}
|
||||
|
||||
CHAR_setInt( cindex, CHAR_SENDMAILCOUNT,
|
||||
CHAR_getInt( cindex, CHAR_SENDMAILCOUNT)+1);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
/* 苇勾井日卅井匀凶凛反]失市它件玄扔□田□卞霜月 */
|
||||
saacproto_Message_send( acfd, mycd, mycharaname,
|
||||
ae->cdkey, ae->charname, textbuffer, color);
|
||||
CHAR_setInt( cindex, CHAR_SENDMAILCOUNT,
|
||||
CHAR_getInt( cindex, CHAR_SENDMAILCOUNT)+1);
|
||||
|
||||
|
||||
snprintf( tmpmsg , sizeof( tmpmsg),ADDRESSBOOK_SENT,ae->charname );
|
||||
CHAR_talkToCli( cindex,-1, tmpmsg , CHAR_COLORWHITE );
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
/*------------------------------------------------------------
|
||||
* 失玉伊旦皮永弁及丢永本□斥毛霜耨允月
|
||||
* saac 井日msg 毛熬仃午匀化弁仿奶失件玄卞禾旦玄允月[
|
||||
*
|
||||
* 忒曰袄
|
||||
------------------------------------------------------------*/
|
||||
BOOL ADDRESSBOOK_sendMessage_FromOther( char *fromcdkey, char *fromcharaname,
|
||||
char *tocdkey, char *tocharaname,
|
||||
char* text , int color )
|
||||
{
|
||||
#define ADDRESSBOOK_SYSTEM "system"
|
||||
|
||||
int i ;
|
||||
char tmpmsg[256];
|
||||
int playernum = CHAR_getPlayerMaxNum();
|
||||
|
||||
/* 扔□田□ 毛腹绸允月 */
|
||||
for( i = 0 ; i < playernum ; i ++){
|
||||
if( CHAR_CHECKINDEX( i) &&
|
||||
strcmp( CHAR_getChar( i, CHAR_CDKEY), tocdkey) == 0 &&
|
||||
strcmp( CHAR_getChar( i, CHAR_NAME), tocharaname) == 0)
|
||||
{
|
||||
int index_to_my_info;
|
||||
/*
|
||||
* CDKEY 手 平乓仿 手域谯仄凶[公及平乓仿弁正及
|
||||
* 失玉伊旦皮永弁卞愤坌及树 互丐月井譬屯化}
|
||||
* 绣箕仄凶日}MSG允月[
|
||||
*/
|
||||
|
||||
/* 扑旦 丞丢永本□斥互窖匀化五凶 */
|
||||
if( strcmp( fromcdkey, ADDRESSBOOK_SYSTEM) == 0 &&
|
||||
strcmp( fromcharaname, ADDRESSBOOK_SYSTEM ) == 0 )
|
||||
{
|
||||
/* 扑旦 丞丢永本□斥毛龚仁 */
|
||||
CHAR_talkToCli( i, -1, text , color );
|
||||
break;
|
||||
}
|
||||
|
||||
index_to_my_info =
|
||||
ADDRESSBOOK_getIndexInAddressbook( i ,
|
||||
fromcdkey, fromcharaname);
|
||||
if( index_to_my_info < 0 ){
|
||||
/*
|
||||
* 锹澎互愤坌毛坫壅仄化仄引匀化月[
|
||||
*/
|
||||
|
||||
snprintf( tmpmsg, sizeof( tmpmsg), ADDRESSBOOK_RETURNED2,
|
||||
tocharaname, tocharaname);
|
||||
|
||||
/* 霜曰潜卞手丢永本□斥 */
|
||||
saacproto_Message_send( acfd, ADDRESSBOOK_SYSTEM , ADDRESSBOOK_SYSTEM,
|
||||
fromcdkey, fromcharaname, tmpmsg, CHAR_COLORYELLOW);
|
||||
|
||||
}
|
||||
else {
|
||||
int fd = getfdFromCharaIndex( i);
|
||||
if( fd != -1 ) {
|
||||
lssproto_MSG_send( fd , index_to_my_info , text , color );
|
||||
/* 夫弘午曰 */
|
||||
printl( LOG_TALK, "CD=%s\tNM=%s\tT=%s" , fromcdkey,
|
||||
fromcharaname, text );
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( i == playernum ) return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int ADDRESSBOOK_getIndexInAddressbook(int cindex , char *cdkey,
|
||||
char *charname)
|
||||
{
|
||||
int i ;
|
||||
|
||||
if( !CHAR_CHECKINDEX( cindex ) ) return -1;
|
||||
|
||||
for( i = 0 ; i < ADDRESSBOOK_MAX ; i++){
|
||||
ADDRESSBOOK_entry *ae = CHAR_getAddressbookEntry( cindex , i );
|
||||
if( ae && ae->use && strcmp( ae->cdkey, cdkey )==0 &&
|
||||
strcmp( ae->charname , charname ) == 0 ){
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
BOOL ADDRESSBOOK_deleteEntry( int meindex ,int index )
|
||||
{
|
||||
ADDRESSBOOK_entry ent;
|
||||
BOOL ret;
|
||||
if( !CHAR_CHECKINDEX( meindex ) ) return FALSE;
|
||||
|
||||
memset( &ent ,0, sizeof( ADDRESSBOOK_entry ));
|
||||
ret = CHAR_setAddressbookEntry( meindex , index , &ent );
|
||||
if( ret == TRUE ){
|
||||
ADDRESSBOOK_sendAddressbookTable( meindex );
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ADDRESSBOOK_addEntry( int meindex )
|
||||
{
|
||||
int objbuf[20];
|
||||
int found_count;
|
||||
int front_x , front_y;
|
||||
int i;
|
||||
int cnt = 0;
|
||||
int fd;
|
||||
char *mycd , *tocd;
|
||||
BOOL found = FALSE;
|
||||
|
||||
if( !CHAR_CHECKINDEX( meindex ) )return FALSE;
|
||||
|
||||
fd = getfdFromCharaIndex( meindex);
|
||||
if( fd == -1 ) return FALSE;
|
||||
|
||||
if( ADDRESSBOOK_findBlankEntry( meindex ) < 0) {
|
||||
CHAR_talkToCli( meindex , -1,ADDRESSBOOK_MYTABLEFULL,CHAR_COLORWHITE );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
for( i = 0; i < CONNECT_WINDOWBUFSIZE; i ++ ) {
|
||||
CONNECT_setTradecardcharaindex( fd,i,-1);
|
||||
}
|
||||
|
||||
CHAR_getCoordinationDir( CHAR_getInt( meindex, CHAR_DIR ) ,
|
||||
CHAR_getInt( meindex , CHAR_X ),
|
||||
CHAR_getInt( meindex , CHAR_Y ) ,
|
||||
1 , &front_x , &front_y );
|
||||
|
||||
found_count = CHAR_getSameCoordinateObjects( objbuf,
|
||||
arraysizeof( objbuf),
|
||||
CHAR_getInt(meindex,CHAR_FLOOR),
|
||||
front_x,front_y );
|
||||
if( found_count == 0 ){
|
||||
CHAR_talkToCli( meindex, -1, ADDRESSBOOK_CANTADD, CHAR_COLORWHITE);
|
||||
return FALSE;
|
||||
}
|
||||
for( i = 0 ; i < found_count; i++ ){
|
||||
int objindex = objbuf[i];
|
||||
int index = OBJECT_getIndex( objindex);
|
||||
if( OBJECT_getType(objindex) != OBJTYPE_CHARA ) {
|
||||
continue;
|
||||
}
|
||||
if( CHAR_getInt( index,CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ){
|
||||
continue;
|
||||
}
|
||||
if( index == meindex ) {
|
||||
continue;
|
||||
}
|
||||
found = TRUE;
|
||||
if( CHAR_getWorkInt( index, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) {
|
||||
continue;
|
||||
}
|
||||
if(!CHAR_getFlg( index, CHAR_ISTRADECARD)) {
|
||||
continue;
|
||||
}
|
||||
if( ADDRESSBOOK_findBlankEntry( index ) < 0 ) {
|
||||
continue;
|
||||
}
|
||||
tocd = CHAR_getChar( index, CHAR_CDKEY);
|
||||
mycd = CHAR_getChar( meindex, CHAR_CDKEY);
|
||||
if( ADDRESSBOOK_getIndexInAddressbook( meindex, tocd,
|
||||
CHAR_getChar( index, CHAR_NAME)) >= 0 &&
|
||||
ADDRESSBOOK_getIndexInAddressbook( index, mycd,
|
||||
CHAR_getChar(meindex, CHAR_NAME) ) >= 0 ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
CONNECT_setTradecardcharaindex( fd,cnt,index);
|
||||
cnt ++;
|
||||
if( cnt == CONNECT_WINDOWBUFSIZE ) break;
|
||||
}
|
||||
|
||||
if( cnt == 0 ) {
|
||||
if( found ) {
|
||||
CHAR_talkToCli( meindex, -1, ADDRESSBOOK_CANTADD2, CHAR_COLORWHITE);
|
||||
}else {
|
||||
CHAR_talkToCli( meindex, -1, ADDRESSBOOK_CANTADD, CHAR_COLORWHITE);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
if( cnt == 1 ) {
|
||||
ADDRESSBOOK_addAddressBook( meindex,
|
||||
CONNECT_getTradecardcharaindex(fd,0) );
|
||||
return TRUE;
|
||||
}else if( cnt > 1 ) {
|
||||
int strlength;
|
||||
char msgbuf[1024];
|
||||
char escapebuf[2048];
|
||||
strcpy( msgbuf, "1\n和谁交换名片呢?\n");
|
||||
strlength = strlen( msgbuf);
|
||||
for( i = 0;
|
||||
CONNECT_getTradecardcharaindex(fd,i) != -1
|
||||
&& i< CONNECT_WINDOWBUFSIZE; i ++ ){
|
||||
char *a = CHAR_getChar( CONNECT_getTradecardcharaindex(fd,i),
|
||||
CHAR_NAME);
|
||||
char buf[256];
|
||||
snprintf( buf, sizeof( buf),"%s\n", a);
|
||||
if( strlength + strlen( buf) > arraysizeof( msgbuf)){
|
||||
print( "%s:%d视窗讯息buffer不足。\n",
|
||||
__FILE__,__LINE__);
|
||||
break;
|
||||
}
|
||||
strcpy( &msgbuf[strlength], buf);
|
||||
strlength += strlen(buf);
|
||||
}
|
||||
lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT,
|
||||
WINDOW_BUTTONTYPE_CANCEL,
|
||||
CHAR_WINDOWTYPE_SELECTTRADECARD,
|
||||
-1,
|
||||
makeEscapeString( msgbuf, escapebuf, sizeof(escapebuf)));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int ADDRESSBOOK_findBlankEntry( int cindex )
|
||||
{
|
||||
int i;
|
||||
|
||||
if( CHAR_CHECKINDEX( cindex ) == FALSE )return -1;
|
||||
|
||||
for( i=0 ; i<ADDRESSBOOK_MAX ; i++){
|
||||
ADDRESSBOOK_entry *ae;
|
||||
ae = CHAR_getAddressbookEntry( cindex , i );
|
||||
if( ae && ae->use == FALSE ) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static BOOL ADDRESSBOOK_makeEntryFromCharaindex( int charaindex,
|
||||
ADDRESSBOOK_entry* ae)
|
||||
{
|
||||
char *cdkey;
|
||||
|
||||
if( !CHAR_CHECKINDEX(charaindex) ) return FALSE;
|
||||
|
||||
memset( ae,0,sizeof(ADDRESSBOOK_entry) );
|
||||
cdkey = CHAR_getChar( charaindex, CHAR_CDKEY);
|
||||
if( cdkey == "\0" || cdkey == NULL ){
|
||||
print( "ADDRESSBOOK_makeEntryFromCharaindex:"
|
||||
" strange! getcdkeyFromCharaIndex returns NULL!"
|
||||
" charaindex: %d\n" , charaindex );
|
||||
return FALSE;
|
||||
}
|
||||
strcpysafe( ae->cdkey , sizeof( ae->cdkey ),cdkey);
|
||||
|
||||
strcpysafe( ae->charname,sizeof( ae->charname),
|
||||
CHAR_getChar(charaindex,CHAR_NAME) );
|
||||
ae->level = CHAR_getInt( charaindex , CHAR_LV );
|
||||
ae->duelpoint = CHAR_getInt( charaindex, CHAR_DUELPOINT);
|
||||
ae->graphicsno = CHAR_getInt( charaindex , CHAR_FACEIMAGENUMBER );
|
||||
ae->online = getServernumber();
|
||||
ae->use = TRUE;
|
||||
ae->transmigration = CHAR_getInt( charaindex, CHAR_TRANSMIGRATION);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void ADDRESSBOOK_notifyLoginLogout( int cindex , int flg )
|
||||
{
|
||||
int i;
|
||||
char *cd=NULL;
|
||||
char *nm = CHAR_getChar( cindex , CHAR_NAME );
|
||||
int playernum = CHAR_getPlayerMaxNum();
|
||||
|
||||
if( !CHAR_CHECKINDEX( cindex ) )return;
|
||||
cd = CHAR_getChar( cindex, CHAR_CDKEY);
|
||||
|
||||
CHAR_send_DpDBUpdate_AddressBook( cindex, flg );
|
||||
|
||||
for( i = 0 ; i < playernum ; i++){
|
||||
if( CHAR_CHECKINDEX( i) && i != cindex ) {
|
||||
int j;
|
||||
for( j = 0 ; j<ADDRESSBOOK_MAX ; j++){
|
||||
ADDRESSBOOK_entry *ae;
|
||||
ae = CHAR_getAddressbookEntry( i , j );
|
||||
if( ae && ae->use == TRUE &&
|
||||
strcmp( ae->cdkey , cd ) == 0 &&
|
||||
strcmp( ae->charname, nm ) == 0 ){
|
||||
|
||||
ae->online = (flg == 0 ) ? 0: getServernumber();
|
||||
ae->level = CHAR_getInt( cindex , CHAR_LV );
|
||||
ae->duelpoint = CHAR_getInt( cindex, CHAR_DUELPOINT);
|
||||
ae->graphicsno = CHAR_getInt( cindex, CHAR_FACEIMAGENUMBER );
|
||||
ae->transmigration = CHAR_getInt( cindex, CHAR_TRANSMIGRATION);
|
||||
|
||||
ADDRESSBOOK_sendAddressbookTableOne( i,j );
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( flg == 0 ){
|
||||
saacproto_Broadcast_send( acfd,cd, nm, "offline", 1);
|
||||
}else if( flg == 1 ) {
|
||||
for( i = 0 ; i < ADDRESSBOOK_MAX; i++ ){
|
||||
int j;
|
||||
ADDRESSBOOK_entry* ae;
|
||||
ae = CHAR_getAddressbookEntry( cindex, i );
|
||||
if( ae->use == 0 )continue;
|
||||
ae->online = 0;
|
||||
for( j=0 ; j < playernum ; j++ ) {
|
||||
if( CHAR_CHECKINDEX( j) &&
|
||||
strcmp( ae->cdkey, CHAR_getChar( j, CHAR_CDKEY)) == 0 &&
|
||||
strcmp( ae->charname, CHAR_getChar( j, CHAR_NAME) )== 0){
|
||||
ae->level = CHAR_getInt( j, CHAR_LV );
|
||||
ae->graphicsno = CHAR_getInt( j, CHAR_FACEIMAGENUMBER );
|
||||
ae->online = getServernumber();
|
||||
ae->transmigration = CHAR_getInt( j, CHAR_TRANSMIGRATION);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( j == playernum) {
|
||||
char buff[512];
|
||||
char escapebuf[1024];
|
||||
ae->online = 0;
|
||||
snprintf( buff, sizeof(buff), "%s_%s", ae->cdkey, ae->charname);
|
||||
makeEscapeString( buff, escapebuf, sizeof(escapebuf));
|
||||
saacproto_DBGetEntryString_send( acfd, DB_ADDRESSBOOK, escapebuf, 0,0);
|
||||
}
|
||||
}
|
||||
ADDRESSBOOK_sendAddressbookTable(cindex);
|
||||
saacproto_Broadcast_send( acfd,cd, nm, "online", 1);
|
||||
saacproto_MessageFlush_send( acfd, cd, nm);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL ADDRESSBOOK_sendAddressbookTable( int cindex )
|
||||
{
|
||||
int stringlen=0;
|
||||
int i;
|
||||
|
||||
if( !CHAR_CHECKINDEX( cindex ) )return FALSE;
|
||||
|
||||
for( i=0 ; i<ADDRESSBOOK_MAX ; i++){
|
||||
ADDRESSBOOK_entry *ae;
|
||||
ae = CHAR_getAddressbookEntry( cindex , i );
|
||||
if( ae && ae->use ){
|
||||
char tmp[CHARNAMELEN+32];
|
||||
char charname_escaped[CHARNAMELEN*2];
|
||||
makeEscapeString( ae->charname, charname_escaped ,
|
||||
sizeof(charname_escaped ));
|
||||
/* 银迕白仿弘| 蟆|伊矛伙|仿奶白|白仿弘 */
|
||||
snprintf( tmp , sizeof( tmp ),
|
||||
"%d|%s|%d|%d|%d|%d|%d|0|" ,
|
||||
ae->use,
|
||||
charname_escaped , ae->level ,
|
||||
ae->duelpoint,ae->online,ae->graphicsno,
|
||||
ae->transmigration);
|
||||
strcpysafe ( ADDRESSBOOK_returnstring + stringlen ,
|
||||
sizeof(ADDRESSBOOK_returnstring) - stringlen,
|
||||
tmp );
|
||||
stringlen += strlen( tmp );
|
||||
if( stringlen >= sizeof(ADDRESSBOOK_returnstring) ) {
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
/*银匀化卅中犯□正手冲徇及心匹霜月 */
|
||||
char tmp[32];
|
||||
snprintf( tmp , sizeof( tmp ), "||||||||" );
|
||||
strcpysafe ( ADDRESSBOOK_returnstring + stringlen ,
|
||||
sizeof(ADDRESSBOOK_returnstring) - stringlen,
|
||||
tmp );
|
||||
stringlen += strlen( tmp );
|
||||
if( stringlen >= sizeof(ADDRESSBOOK_returnstring)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dchop( ADDRESSBOOK_returnstring, "|" );
|
||||
|
||||
{
|
||||
int fd;
|
||||
fd = getfdFromCharaIndex( cindex );
|
||||
if( fd == -1 ) return FALSE;
|
||||
lssproto_AB_send( fd, ADDRESSBOOK_returnstring );
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ADDRESSBOOK_sendAddressbookTableOne( int cindex, int num )
|
||||
{
|
||||
int stringlen=0;
|
||||
ADDRESSBOOK_entry *ae;
|
||||
|
||||
if( !CHAR_CHECKINDEX( cindex ) )return FALSE;
|
||||
if( num < 0 || num > ADDRESSBOOK_MAX) return FALSE;
|
||||
|
||||
ae = CHAR_getAddressbookEntry( cindex , num );
|
||||
|
||||
if( ae && ae->use ){
|
||||
char tmp[CHARNAMELEN+32];
|
||||
char charname_escaped[CHARNAMELEN*2];
|
||||
makeEscapeString( ae->charname, charname_escaped ,
|
||||
sizeof(charname_escaped ));
|
||||
snprintf( tmp , sizeof( tmp ),
|
||||
"%d|%s|%d|%d|%d|%d|%d|0|" ,
|
||||
ae->use,
|
||||
charname_escaped , ae->level ,
|
||||
ae->duelpoint,ae->online,ae->graphicsno,
|
||||
ae->transmigration);
|
||||
strcpysafe ( ADDRESSBOOK_returnstring + stringlen ,
|
||||
sizeof(ADDRESSBOOK_returnstring) - stringlen,
|
||||
tmp );
|
||||
stringlen += strlen( tmp );
|
||||
if( stringlen >= sizeof(ADDRESSBOOK_returnstring) ) {
|
||||
return FALSE;
|
||||
}
|
||||
}else{
|
||||
char tmp[32];
|
||||
snprintf( tmp , sizeof( tmp ), "||||||||" );
|
||||
strcpysafe ( ADDRESSBOOK_returnstring + stringlen ,
|
||||
sizeof(ADDRESSBOOK_returnstring) - stringlen,
|
||||
tmp );
|
||||
stringlen += strlen( tmp );
|
||||
if( stringlen >= sizeof(ADDRESSBOOK_returnstring)) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
int fd;
|
||||
fd = getfdFromCharaIndex( cindex );
|
||||
if( fd == -1 ) return FALSE;
|
||||
lssproto_ABI_send( fd, num, ADDRESSBOOK_returnstring );
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------
|
||||
* 夫午勾及失玉伊旦皮永弁巨件玄伉毛} 侬 卞卅云允[
|
||||
* 仇木反平乓仿忡绣迕卅及匹弁仿奶失件玄卞霜耨允月方曰手恳割
|
||||
* 卅手及匹丐月 邰互丐月[
|
||||
* 娄醒
|
||||
* a ADDRESSBOOK_entry* 侬 卞仄凶中厌瞻 尺及禾奶件正
|
||||
* 忒曰袄
|
||||
* char *
|
||||
------------------------------------------------------------*/
|
||||
char *ADDRESSBOOK_makeAddressbookString( ADDRESSBOOK_entry *a )
|
||||
{
|
||||
char work1[256], work2[256];
|
||||
|
||||
if( a->use == 0 ){
|
||||
/* 坞巨件玄伉分匀凶日坞 侬 */
|
||||
ADDRESSBOOK_returnstring[0] = '\0';
|
||||
return ADDRESSBOOK_returnstring;
|
||||
}
|
||||
|
||||
makeEscapeString( a->cdkey, work1, sizeof( work1 ));
|
||||
makeEscapeString( a->charname , work2 , sizeof( work2 ));
|
||||
snprintf( ADDRESSBOOK_returnstring,
|
||||
sizeof( ADDRESSBOOK_returnstring ),
|
||||
"%s|%s|%d|%d|%d|%d",
|
||||
work1, work2, a->level, a->duelpoint, a->graphicsno,a->transmigration);
|
||||
|
||||
return ADDRESSBOOK_returnstring;
|
||||
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------
|
||||
* 侬 祭今木化中月失玉伊旦皮永弁巨件玄伉毛}厌瞻 卞卅云允[
|
||||
* 仇及瑛绊厌瞻 及use动陆及树 反敦僬卞卅月[
|
||||
* 娄醒
|
||||
* in char* 侬
|
||||
* a ADDRESSBOOK_entry* 犯□正毛璋户月赭
|
||||
* 忒曰袄
|
||||
* 勾友卞TRUE
|
||||
------------------------------------------------------------*/
|
||||
BOOL ADDRESSBOOK_makeAddressbookEntry( char *in , ADDRESSBOOK_entry *a )
|
||||
{
|
||||
char work1[256], work2[256] , work3[256] , work4[256],work5[256],work6[256];
|
||||
int ret;
|
||||
if( strlen( in ) == 0 ){
|
||||
memset( a,0,sizeof(ADDRESSBOOK_entry) );
|
||||
a->use = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
getStringFromIndexWithDelim( in, "|" , 1 , work1 , sizeof( work1 ));
|
||||
getStringFromIndexWithDelim( in, "|" , 2 , work2 , sizeof( work2 ));
|
||||
getStringFromIndexWithDelim( in, "|" , 3 , work3 , sizeof( work3 ));
|
||||
getStringFromIndexWithDelim( in, "|" , 4 , work4 , sizeof( work4 ));
|
||||
getStringFromIndexWithDelim( in, "|" , 5 , work5 , sizeof( work5 ));
|
||||
work6[0] = '\0';
|
||||
ret = getStringFromIndexWithDelim( in, "|" , 6 , work6 , sizeof( work6 ));
|
||||
if( ret == FALSE ) {
|
||||
a->transmigration = 0;
|
||||
}
|
||||
else {
|
||||
a->transmigration = atoi( work6);
|
||||
}
|
||||
a->use = 1;
|
||||
|
||||
makeStringFromEscaped( work1 );
|
||||
makeStringFromEscaped( work2 );
|
||||
|
||||
strcpysafe( a->cdkey , sizeof(a->cdkey) , work1 );
|
||||
strcpysafe( a->charname , sizeof(a->charname), work2 );
|
||||
|
||||
a->level = atoi( work3 );
|
||||
a->duelpoint = atoi( work4 );
|
||||
a->graphicsno = atoi( work5 );
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void ADDRESSBOOK_addAddressBook( int meindex, int toindex)
|
||||
{
|
||||
char tmpstring[CHARNAMELEN +
|
||||
ADDRESSBOOK_FIXEDMESSAGE_MAXLEN];
|
||||
|
||||
int hisblank;
|
||||
int myblank;
|
||||
int myaddindex, toaddindex;
|
||||
int dir;
|
||||
char *cdkey;
|
||||
|
||||
hisblank = ADDRESSBOOK_findBlankEntry( toindex );
|
||||
if( hisblank < 0 ) {
|
||||
CHAR_talkToCli( meindex, -1, ADDRESSBOOK_HISTABLEFULL, CHAR_COLORWHITE);
|
||||
return ;
|
||||
}
|
||||
myblank = ADDRESSBOOK_findBlankEntry( meindex );
|
||||
if( myblank < 0 ){
|
||||
CHAR_talkToCli( meindex , -1, ADDRESSBOOK_MYTABLEFULL, CHAR_COLORWHITE );
|
||||
return ;
|
||||
}
|
||||
|
||||
cdkey = CHAR_getChar( toindex, CHAR_CDKEY);
|
||||
myaddindex = ADDRESSBOOK_getIndexInAddressbook( meindex, cdkey,
|
||||
CHAR_getChar( toindex, CHAR_NAME));
|
||||
cdkey = CHAR_getChar( meindex, CHAR_CDKEY);
|
||||
toaddindex = ADDRESSBOOK_getIndexInAddressbook( toindex, cdkey,
|
||||
CHAR_getChar(meindex, CHAR_NAME));
|
||||
if( myaddindex < 0 ){
|
||||
ADDRESSBOOK_entry hisentry;
|
||||
|
||||
if( ADDRESSBOOK_makeEntryFromCharaindex(toindex,&hisentry) == FALSE ){
|
||||
return ;
|
||||
}
|
||||
CHAR_setAddressbookEntry( meindex, myblank,&hisentry );
|
||||
|
||||
snprintf( tmpstring, sizeof( tmpstring),
|
||||
toaddindex < 0 ? ADDRESSBOOK_ADDED: ADDRESSBOOK_GIVEADDRESS,
|
||||
hisentry.charname);
|
||||
CHAR_talkToCli( meindex , -1,tmpstring, CHAR_COLORWHITE );
|
||||
ADDRESSBOOK_sendAddressbookTableOne( meindex, myblank);
|
||||
}else{
|
||||
snprintf( tmpstring, sizeof( tmpstring), ADDRESSBOOK_TAKEADDRESS1,
|
||||
CHAR_getChar( toindex, CHAR_NAME));
|
||||
CHAR_talkToCli( meindex, -1, tmpstring, CHAR_COLORWHITE);
|
||||
|
||||
}
|
||||
if( toaddindex < 0 ) {
|
||||
ADDRESSBOOK_entry meae;
|
||||
if( ADDRESSBOOK_makeEntryFromCharaindex(meindex,&meae) == FALSE) {
|
||||
return;
|
||||
}
|
||||
CHAR_setAddressbookEntry( toindex, hisblank,&meae );
|
||||
snprintf( tmpstring , sizeof( tmpstring),
|
||||
myaddindex < 0 ? ADDRESSBOOK_ADDED : ADDRESSBOOK_GIVEADDRESS,
|
||||
CHAR_getChar( meindex, CHAR_NAME ) );
|
||||
CHAR_talkToCli( toindex, -1, tmpstring, CHAR_COLORWHITE);
|
||||
ADDRESSBOOK_sendAddressbookTableOne( toindex , hisblank);
|
||||
}else {
|
||||
if( myaddindex < 0 ) {
|
||||
snprintf( tmpstring , sizeof( tmpstring),
|
||||
ADDRESSBOOK_TAKEADDRESS2,
|
||||
CHAR_getChar( meindex, CHAR_NAME ) );
|
||||
CHAR_talkToCli( toindex, -1, tmpstring, CHAR_COLORWHITE);
|
||||
}
|
||||
}
|
||||
dir = NPC_Util_GetDirCharToChar( toindex, meindex, 0);
|
||||
if( dir != -1) {
|
||||
|
||||
if( CHAR_getInt( toindex, CHAR_DIR) != dir) {
|
||||
CHAR_setInt( toindex, CHAR_DIR, dir);
|
||||
}
|
||||
CHAR_sendWatchEvent( CHAR_getWorkInt( toindex, CHAR_WORKOBJINDEX),
|
||||
CHAR_ACTNOD,NULL,0,TRUE);
|
||||
CHAR_setWorkInt( toindex, CHAR_WORKACTION, CHAR_ACTNOD);
|
||||
CHAR_sendWatchEvent( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX),
|
||||
CHAR_ACTNOD,NULL,0,TRUE);
|
||||
CHAR_setWorkInt( meindex, CHAR_WORKACTION, CHAR_ACTNOD);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void ADDRESSBOOK_DispatchMessage( char *cd, char *nm, char *value, int mode)
|
||||
{
|
||||
int i;
|
||||
char work[256];
|
||||
int online,level,duelpoint, faceimagenumber, transmigration;
|
||||
int playernum = CHAR_getPlayerMaxNum();
|
||||
int ret;
|
||||
|
||||
getStringFromIndexWithDelim( value, "|" , 1 , work , sizeof( work ));
|
||||
online = atoi( work);
|
||||
getStringFromIndexWithDelim( value, "|" , 2 , work , sizeof( work ));
|
||||
level = atoi( work);
|
||||
getStringFromIndexWithDelim( value, "|" , 3 , work , sizeof( work ));
|
||||
duelpoint = atoi( work);
|
||||
getStringFromIndexWithDelim( value, "|" , 4 , work , sizeof( work ));
|
||||
faceimagenumber = atoi( work);
|
||||
ret = getStringFromIndexWithDelim( value, "|" , 5 , work , sizeof( work ));
|
||||
if( ret ) {
|
||||
transmigration = atoi( work);
|
||||
}
|
||||
else {
|
||||
transmigration = 0;
|
||||
}
|
||||
|
||||
if( online == getServernumber()) {
|
||||
for( i = 0 ; i < playernum ; i++) {
|
||||
if( CHAR_CHECKINDEX( i )) {
|
||||
char *c = CHAR_getChar( i, CHAR_CDKEY);
|
||||
char *n = CHAR_getChar( i, CHAR_NAME);
|
||||
if( c == "\0" || n == "\0" ) continue;
|
||||
if( c == NULL || n == NULL ) continue;
|
||||
if( strcmp( c , cd ) == 0 && strcmp( n, nm ) == 0 ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( i == playernum ) {
|
||||
online = 0;
|
||||
saacproto_Broadcast_send( acfd,cd, nm, "offline", 1);
|
||||
}
|
||||
}
|
||||
|
||||
for( i = 0 ; i < playernum ; i++) {
|
||||
if( CHAR_CHECKINDEX( i )) {
|
||||
int j;
|
||||
for( j = 0 ; j < ADDRESSBOOK_MAX ; j++) {
|
||||
ADDRESSBOOK_entry *ae;
|
||||
ae = CHAR_getAddressbookEntry( i ,j );
|
||||
if( ae && ae->use == TRUE &&
|
||||
strcmp( ae->cdkey , cd ) == 0 &&
|
||||
strcmp( ae->charname, nm ) == 0 )
|
||||
{
|
||||
if( mode == 0 ) {
|
||||
ae->use = FALSE;
|
||||
}else {
|
||||
ae->online = online;
|
||||
ae->level = level;
|
||||
ae->duelpoint = duelpoint;
|
||||
ae->graphicsno = faceimagenumber;
|
||||
ae->transmigration = transmigration;
|
||||
}
|
||||
ADDRESSBOOK_sendAddressbookTableOne( i,j );
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _ANGLE_EMAIL
|
||||
BOOL ADDRESSBOOK_AutoaddAddressBook( int meindex, int toindex)
|
||||
{
|
||||
int hisblank;
|
||||
int myblank;
|
||||
int myaddindex, toaddindex;
|
||||
|
||||
char *cdkey;
|
||||
|
||||
myblank = ADDRESSBOOK_findBlankEntry( meindex );
|
||||
hisblank = ADDRESSBOOK_findBlankEntry( toindex );
|
||||
|
||||
//myblank = 79;
|
||||
//hisblank = 79;
|
||||
|
||||
if( hisblank < 0 || myblank < 0) { //"名片匣已满。"
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
cdkey = CHAR_getChar( toindex, CHAR_CDKEY);
|
||||
myaddindex = ADDRESSBOOK_getIndexInAddressbook( meindex, cdkey,
|
||||
CHAR_getChar( toindex, CHAR_NAME));
|
||||
cdkey = CHAR_getChar( meindex, CHAR_CDKEY);
|
||||
toaddindex = ADDRESSBOOK_getIndexInAddressbook( toindex, cdkey,
|
||||
CHAR_getChar(meindex, CHAR_NAME));
|
||||
if( myaddindex < 0 ){
|
||||
ADDRESSBOOK_entry meae;
|
||||
ADDRESSBOOK_entry hisentry;
|
||||
if( ADDRESSBOOK_makeEntryFromCharaindex(toindex,&hisentry) == FALSE ||
|
||||
ADDRESSBOOK_makeEntryFromCharaindex(meindex,&meae) == FALSE ){
|
||||
return FALSE;
|
||||
}
|
||||
CHAR_setAddressbookEntry( meindex, myblank,&hisentry );
|
||||
CHAR_setAddressbookEntry( toindex, hisblank,&meae );
|
||||
ADDRESSBOOK_sendAddressbookTableOne( meindex, myblank);
|
||||
ADDRESSBOOK_sendAddressbookTableOne( toindex , hisblank);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
11085
char/char.c
Normal file
11085
char/char.c
Normal file
File diff suppressed because it is too large
Load Diff
709
char/char_angel.c
Normal file
709
char/char_angel.c
Normal file
@ -0,0 +1,709 @@
|
||||
#include "version.h"
|
||||
#ifdef _ANGEL_SUMMON
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h> // shan
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <errno.h>
|
||||
#include "common.h"
|
||||
#include "char_base.h"
|
||||
#include "char_data.h"
|
||||
#include "char.h"
|
||||
#include "lssproto_serv.h"
|
||||
#include "item.h"
|
||||
#include "item_event.h"
|
||||
#include "buf.h"
|
||||
#include "object.h"
|
||||
#include "map_deal.h"
|
||||
#include "saacproto_cli.h"
|
||||
#include "readmap.h"
|
||||
#include "handletime.h"
|
||||
#include "char_event.h"
|
||||
#include "npccreate.h"
|
||||
#include "addressbook.h"
|
||||
#include "item_event.h"
|
||||
#include "magic_base.h"
|
||||
#include "magic.h"
|
||||
#include "chatmagic.h"
|
||||
#include "configfile.h"
|
||||
#include "log.h"
|
||||
#include "anim_tbl.h"
|
||||
#include "encount.h"
|
||||
#include "battle.h"
|
||||
#include "pet_skill.h"
|
||||
#include "util.h"
|
||||
#include "enemy.h"
|
||||
#include "npcutil.h"
|
||||
#include "pet.h"
|
||||
#include "family.h"
|
||||
|
||||
struct MissionInfo missionlist[MAXMISSION];
|
||||
int mission_num =0;
|
||||
struct MissionTable missiontable[MAXMISSIONTABLE];
|
||||
|
||||
//#define ANGELITEM 2884 //20701 //使者的信物 道具编号
|
||||
//#define HEROITEM 2885 //20702 //勇者的信物 道具编号
|
||||
|
||||
extern int AngelReady;
|
||||
|
||||
char* getMissionNameInfo( int charaindex, char* nameinfo)
|
||||
{
|
||||
sprintf( nameinfo, "%s:%s", CHAR_getChar( charaindex, CHAR_CDKEY), CHAR_getChar( charaindex, CHAR_NAME) );
|
||||
return nameinfo;
|
||||
}
|
||||
|
||||
int checkIfAngel( int charaindex)
|
||||
{
|
||||
int i;
|
||||
char nameinfo[512];
|
||||
|
||||
//sprintf( nameinfo, "%s:%s", CHAR_getChar( charaindex, CHAR_CDKEY), CHAR_getChar( charaindex, CHAR_NAME) );
|
||||
getMissionNameInfo( charaindex, nameinfo);
|
||||
for( i =0; i <MAXMISSIONTABLE; i++) {
|
||||
if( missiontable[i].angelinfo[0] == '\0')
|
||||
continue;
|
||||
if( !strcmp( nameinfo, missiontable[i].angelinfo) ) {
|
||||
return i;
|
||||
}
|
||||
else if( !strcmp( nameinfo, missiontable[i].heroinfo) ) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int checkIfOnlyAngel( int charaindex)
|
||||
{
|
||||
int i;
|
||||
char nameinfo[512];
|
||||
|
||||
//sprintf( nameinfo, "%s:%s", CHAR_getChar( charaindex, CHAR_CDKEY), CHAR_getChar( charaindex, CHAR_NAME) );
|
||||
getMissionNameInfo( charaindex, nameinfo);
|
||||
for( i =0; i <MAXMISSIONTABLE; i++) {
|
||||
if( missiontable[i].angelinfo[0] == '\0')
|
||||
continue;
|
||||
if( !strcmp( nameinfo, missiontable[i].angelinfo) ) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int checkIfOnlyHero( int charaindex)
|
||||
{
|
||||
int i;
|
||||
char nameinfo[512];
|
||||
|
||||
//sprintf( nameinfo, "%s:%s", CHAR_getChar( charaindex, CHAR_CDKEY), CHAR_getChar( charaindex, CHAR_NAME) );
|
||||
getMissionNameInfo( charaindex, nameinfo);
|
||||
for( i =0; i <MAXMISSIONTABLE; i++) {
|
||||
if( missiontable[i].angelinfo[0] == '\0')
|
||||
continue;
|
||||
if( !strcmp( nameinfo, missiontable[i].heroinfo) ) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int checkIfAngelByName( char* nameinfo)
|
||||
{
|
||||
int i;
|
||||
|
||||
for( i =0; i <MAXMISSIONTABLE; i++) {
|
||||
if( missiontable[i].angelinfo[0] == '\0')
|
||||
continue;
|
||||
if( !strcmp( nameinfo, missiontable[i].angelinfo) ) {
|
||||
return i;
|
||||
}
|
||||
else if( !strcmp( nameinfo, missiontable[i].heroinfo) ) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
void addAngelData( int angelindex, int heroindex, int mission, int flag)
|
||||
{
|
||||
char buf[1024];
|
||||
char angelinfo[512];
|
||||
char heroinfo[512];
|
||||
|
||||
//if( checkIfAngel( angelindex) != -1 || checkIfAngel( heroindex) != -1 )
|
||||
// return;
|
||||
//sprintf( angelinfo, "%s:%s", CHAR_getChar( angelindex, CHAR_CDKEY), CHAR_getChar( angelindex, CHAR_NAME) );
|
||||
getMissionNameInfo( angelindex, angelinfo);
|
||||
//sprintf( heroinfo, "%s:%s", CHAR_getChar( heroindex, CHAR_CDKEY), CHAR_getChar( heroindex, CHAR_NAME) );
|
||||
getMissionNameInfo( heroindex, heroinfo);
|
||||
|
||||
sprintf( buf, "%s|%s|%d|%d", angelinfo, heroinfo, mission, flag );;
|
||||
//saacproto_ACMissionTable_send( acfd, -1, 2, buf, angelindex);
|
||||
saacproto_ACMissionTable_send( acfd, -1, 2, buf, angelinfo);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//void selectAngel( int charaindex)
|
||||
void selectAngel( int charaindex, int heroindex, int mission, int gm_cmd)
|
||||
{
|
||||
// gm_cmd 表示是否由GM指令产生,
|
||||
|
||||
//int heroindex =-1;
|
||||
int findindex, startindex;
|
||||
//char msg[1024];
|
||||
int max_char;
|
||||
//int mission;
|
||||
|
||||
if( AngelReady <= 0 && gm_cmd == FALSE)
|
||||
return;
|
||||
|
||||
//sprintf( msg, " 使者资格检查: %s %s ", CHAR_getChar( charaindex, CHAR_CDKEY), CHAR_getChar( charaindex, CHAR_NAME));
|
||||
//print( msg);
|
||||
//LogAngel( msg);
|
||||
|
||||
// 天使条件检查
|
||||
if( gm_cmd == FALSE )
|
||||
{
|
||||
if( checkIfAngel( charaindex) != -1) // 是否天使或勇者
|
||||
{
|
||||
//print(" ANGEL已经是天使或勇者了 ");
|
||||
return;
|
||||
}
|
||||
|
||||
if( CHAR_getInt( charaindex, CHAR_LV) < 30 || !NPC_EventCheckFlg( charaindex, 4 ) )
|
||||
{
|
||||
//print(" ANGEL资格不符 ");
|
||||
return;
|
||||
}
|
||||
|
||||
srand( time(NULL));
|
||||
if( rand()%3 == 0 ) // 天使的机率 2/3
|
||||
{
|
||||
//print(" ANGEL机率检查不通过 ");
|
||||
return;
|
||||
}
|
||||
}
|
||||
//print(" ANGEL决定 ");
|
||||
|
||||
|
||||
// 挑选勇者
|
||||
if( heroindex == -1 )
|
||||
{
|
||||
//heroindex = -1;
|
||||
max_char = CHAR_getPlayerMaxNum();
|
||||
startindex = RAND( 0, max_char-1);
|
||||
findindex = startindex;
|
||||
while(1) {
|
||||
if( findindex == startindex-1) break;
|
||||
findindex = (findindex+1) % max_char;
|
||||
if( !CHAR_CHECKINDEX( findindex) ) continue;
|
||||
if( CHAR_getInt( findindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) continue;
|
||||
if( findindex == charaindex ) continue;
|
||||
if( checkIfAngel( findindex) != -1) continue; // 是否天使或勇者
|
||||
if( CHAR_getInt( findindex, CHAR_LV) < 80 || !NPC_EventCheckFlg( findindex, 4 ) ) continue; // 勇者的条件
|
||||
if( rand()%3 == 0 ) continue; // 勇者的机率 2/3
|
||||
|
||||
heroindex = findindex;
|
||||
|
||||
//print(" ANGEL勇者决定 ");
|
||||
|
||||
break;
|
||||
}
|
||||
if( heroindex < 0) {
|
||||
// sprintf( msg, " 没有找到勇者人选!! ");
|
||||
// print( msg);
|
||||
//LogAngel( msg);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 决定任务
|
||||
if( mission == -1 )
|
||||
{
|
||||
int mlist[MAXMISSION]; // 符合条件的任务列表
|
||||
char eventlist[1024];
|
||||
char buf[64];
|
||||
int i, j, mindex =0;
|
||||
|
||||
memset( mlist, 0, sizeof(mlist));
|
||||
for( i =0; i <MAXMISSION; i++) {
|
||||
int checked =TRUE;
|
||||
if( missionlist[i].id <= 0) continue;
|
||||
if( CHAR_getInt( heroindex, CHAR_LV) < missionlist[i].level )
|
||||
continue;
|
||||
strcpy( eventlist, missionlist[i].eventflag); // 检查必要旗标
|
||||
j =0;
|
||||
while(1) {
|
||||
j++;
|
||||
if( getStringFromIndexWithDelim( eventlist, ";", j, buf, sizeof(buf)) == FALSE )
|
||||
break;
|
||||
if( buf[0] != '!') { // 必要旗标或禁止旗标
|
||||
if( !NPC_EventCheckFlg( heroindex, atoi(buf) )) {
|
||||
checked = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if( NPC_EventCheckFlg( heroindex, atoi(buf+1) )) {
|
||||
checked = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( checked ) {
|
||||
mlist[mindex] = missionlist[i].id;
|
||||
//print(" mlist[%d]=%d ", mindex, mlist[mindex]);
|
||||
mindex++;
|
||||
}
|
||||
}
|
||||
if( mindex <= 0 ) {
|
||||
//sprintf( msg, " 找不到合适的任务 ");
|
||||
//print( msg);
|
||||
//LogAngel( msg);
|
||||
return;
|
||||
}
|
||||
|
||||
mission = mlist[rand()%mindex];
|
||||
}
|
||||
|
||||
|
||||
addAngelData( charaindex, heroindex, mission, MISSION_WAIT_ANSWER); // 传到AC
|
||||
|
||||
// 清除旗标 event8 224~255 为精灵召唤专用
|
||||
CHAR_setInt( charaindex, CHAR_NOWEVENT8, 0);
|
||||
CHAR_setInt( charaindex, CHAR_ENDEVENT8, 0);
|
||||
CHAR_setInt( heroindex, CHAR_NOWEVENT8, 0);
|
||||
CHAR_setInt( heroindex, CHAR_ENDEVENT8, 0);
|
||||
|
||||
if( gm_cmd == FALSE )
|
||||
AngelReady = 0; // 清除缺额
|
||||
|
||||
{
|
||||
//sprintf( msg, " 产生 %s 天使候补: %s %s Lv:%d 勇者候补: %s %s Lv:%d 任务:%d ci=%d hi=%d ",
|
||||
//gm_cmd ? ("(GM指令)") : (" "),
|
||||
//CHAR_getChar( charaindex, CHAR_CDKEY), CHAR_getChar( charaindex, CHAR_NAME), CHAR_getInt( charaindex, CHAR_LV),
|
||||
//CHAR_getChar( heroindex, CHAR_CDKEY), CHAR_getChar( heroindex, CHAR_NAME), CHAR_getInt( heroindex, CHAR_LV),
|
||||
//mission, charaindex, heroindex);
|
||||
//print( msg);
|
||||
//LogAngel( msg);
|
||||
}
|
||||
}
|
||||
|
||||
void sendAngelCleanToCli( int fd)
|
||||
{
|
||||
lssproto_WN_send( fd, //getfdFromCharaIndex(charaindex),
|
||||
WINDOW_MESSAGETYPE_ANGELMESSAGE, -1,
|
||||
CHAR_WINDOWTYPE_ANGEL_CLEAN,
|
||||
-1, "");
|
||||
}
|
||||
|
||||
int AngelCreate( int angelindex)
|
||||
{
|
||||
int emptyitem1, emptyitem2;
|
||||
int angeltokenindex, herotokenindex;
|
||||
char msgbuf[1024]/*, nameinfo[1024]*/;
|
||||
int mindex;
|
||||
char herocdkey[64];
|
||||
char heroname[64];
|
||||
|
||||
if( !CHAR_CHECKINDEX( angelindex)) return FALSE;
|
||||
|
||||
print(" 天使答应了!! ");
|
||||
|
||||
mindex = checkIfAngel( angelindex);
|
||||
if( mindex == -1 || missiontable[mindex].flag == MISSION_TIMEOVER ) {
|
||||
//print("\n ANGEL错误!!Table逾时或无资料??:%d ", angelindex );
|
||||
CHAR_talkToCli( angelindex, -1, "很抱歉,你太晚回答,已经逾时了。", CHAR_COLORYELLOW);
|
||||
|
||||
sprintf( msgbuf, " 回答逾时或无资料 i:%d 使者:%s %s ", mindex, CHAR_getChar( angelindex, CHAR_CDKEY), CHAR_getChar( angelindex, CHAR_NAME));
|
||||
print( msgbuf);
|
||||
LogAngel( msgbuf);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if( missiontable[mindex].flag != MISSION_WAIT_ANSWER ) {
|
||||
print(" 旗标不符:%d ", missiontable[mindex].flag);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if( CHAR_findEmptyItemBoxNo( angelindex ) < 2 ){
|
||||
CHAR_talkToCli( angelindex, -1, "空间栏位不足。至少要有两个空道具栏位。", CHAR_COLORYELLOW);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
getStringFromIndexWithDelim( missiontable[mindex].heroinfo, ":", 1, herocdkey, sizeof(herocdkey));
|
||||
getStringFromIndexWithDelim( missiontable[mindex].heroinfo, ":", 2, heroname, sizeof(heroname));
|
||||
|
||||
angeltokenindex = ITEM_makeItemAndRegist( ANGELITEM );
|
||||
if( angeltokenindex != -1 ){
|
||||
/*if( ITEM_getInt( angeltokenindex, ITEM_TYPE) != ITEM_ANGELTOKEN) {
|
||||
print(" 制作使者信物失败 ");
|
||||
ITEM_endExistItemsOne( angeltokenindex);
|
||||
return;
|
||||
}*/
|
||||
|
||||
//sprintf( nameinfo, "%s:%s", CHAR_getChar( angelindex, CHAR_CDKEY), CHAR_getChar( angelindex, CHAR_NAME ) );
|
||||
ITEM_setChar( angeltokenindex, ITEM_ANGELINFO, missiontable[mindex].angelinfo);
|
||||
ITEM_setChar( angeltokenindex, ITEM_HEROINFO, missiontable[mindex].heroinfo);
|
||||
sprintf( msgbuf, "%d", missiontable[mindex].mission);
|
||||
ITEM_setChar( angeltokenindex, ITEM_ANGELMISSION, msgbuf);
|
||||
//sprintf( msgbuf, "%s(%s)", ITEM_getChar( angeltokenindex, ITEM_NAME), CHAR_getChar( angelindex, CHAR_NAME ) );
|
||||
//ITEM_setChar( angeltokenindex, ITEM_NAME, msgbuf);
|
||||
//ITEM_setChar( angeltokenindex, ITEM_SECRETNAME, msgbuf);
|
||||
//sprintf( msgbuf, "这是使者 %s 与勇者 %s 专属的信物", CHAR_getChar( angelindex, CHAR_NAME), heroname );
|
||||
sprintf( msgbuf, "精灵使者 %s 的信物,装备後不遇敌。", CHAR_getChar( angelindex, CHAR_NAME) );
|
||||
ITEM_setChar( angeltokenindex, ITEM_EFFECTSTRING, msgbuf);
|
||||
|
||||
emptyitem1 = CHAR_addItemSpecificItemIndex( angelindex, angeltokenindex);
|
||||
CHAR_sendItemDataOne( angelindex, emptyitem1);
|
||||
LogItem(
|
||||
CHAR_getChar( angelindex, CHAR_NAME ),
|
||||
CHAR_getChar( angelindex, CHAR_CDKEY ),
|
||||
angeltokenindex,
|
||||
"AddItem(制作道具 使者信物)",
|
||||
CHAR_getInt( angelindex,CHAR_FLOOR),
|
||||
CHAR_getInt( angelindex,CHAR_X ),
|
||||
CHAR_getInt( angelindex,CHAR_Y ),
|
||||
ITEM_getChar( angeltokenindex, ITEM_UNIQUECODE),
|
||||
ITEM_getChar( angeltokenindex, ITEM_NAME),
|
||||
ITEM_getInt( angeltokenindex, ITEM_ID) );
|
||||
CHAR_talkToCli( angelindex, -1,"得到使者的信物。", CHAR_COLORYELLOW);
|
||||
}else{
|
||||
print("制作使者的信物失败。" );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
herotokenindex = ITEM_makeItemAndRegist( HEROITEM );
|
||||
if( herotokenindex != -1 ){
|
||||
/*if( ITEM_getInt( herotokenindex, ITEM_TYPE) != ITEM_HEROTOKEN) {
|
||||
print(" 制作勇者信物失败 ");
|
||||
ITEM_endExistItemsOne( herotokenindex);
|
||||
ITEM_endExistItemsOne( angeltokenindex);
|
||||
CHAR_sendItemDataOne( angelindex, emptyitem1);
|
||||
return;
|
||||
}*/
|
||||
//sprintf( nameinfo, "%s:%s", CHAR_getChar( angelindex, CHAR_CDKEY), CHAR_getChar( angelindex, CHAR_NAME ) );
|
||||
ITEM_setChar( herotokenindex, ITEM_ANGELINFO, missiontable[mindex].angelinfo);
|
||||
ITEM_setChar( herotokenindex, ITEM_HEROINFO, missiontable[mindex].heroinfo);
|
||||
sprintf( msgbuf, "%d", missiontable[mindex].mission);
|
||||
ITEM_setChar( herotokenindex, ITEM_ANGELMISSION, msgbuf);
|
||||
//sprintf( msgbuf, "%s(%s)", ITEM_getChar( herotokenindex, ITEM_NAME), heroname );
|
||||
//ITEM_setChar( herotokenindex, ITEM_NAME, msgbuf);
|
||||
//ITEM_setChar( herotokenindex, ITEM_SECRETNAME, msgbuf);
|
||||
//sprintf( msgbuf, "这是勇者 %s 与使者 %s 专属的信物", heroname, CHAR_getChar( angelindex, CHAR_NAME) );
|
||||
sprintf( msgbuf, "勇者 %s 的信物,使者使用可传送至勇者身边。", heroname );
|
||||
ITEM_setChar( herotokenindex, ITEM_EFFECTSTRING, msgbuf);
|
||||
|
||||
emptyitem2 = CHAR_addItemSpecificItemIndex( angelindex, herotokenindex);
|
||||
|
||||
CHAR_sendItemDataOne( angelindex, emptyitem2);
|
||||
LogItem(
|
||||
CHAR_getChar( angelindex, CHAR_NAME ),
|
||||
CHAR_getChar( angelindex, CHAR_CDKEY ),
|
||||
herotokenindex,
|
||||
"AddItem(制作道具 勇者信物)",
|
||||
CHAR_getInt( angelindex,CHAR_FLOOR),
|
||||
CHAR_getInt( angelindex,CHAR_X ),
|
||||
CHAR_getInt( angelindex,CHAR_Y ),
|
||||
ITEM_getChar( herotokenindex, ITEM_UNIQUECODE),
|
||||
ITEM_getChar( herotokenindex, ITEM_NAME),
|
||||
ITEM_getInt( herotokenindex, ITEM_ID) );
|
||||
CHAR_talkToCli( angelindex, -1,"得到勇者的信物。", CHAR_COLORYELLOW);
|
||||
}else{
|
||||
print("制作勇者的信物失败。" );
|
||||
ITEM_endExistItemsOne( angeltokenindex);
|
||||
CHAR_sendItemDataOne( angelindex, emptyitem1);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// 更新至AC Server
|
||||
//sprintf( nameinfo, "%s:%s", CHAR_getChar( angelindex, CHAR_CDKEY), CHAR_getChar( angelindex, CHAR_NAME ) );
|
||||
sprintf( msgbuf, "%s|%d", missiontable[mindex].angelinfo, missionlist[missiontable[mindex].mission].limittime );
|
||||
saacproto_ACMissionTable_send( acfd, MISSION_DOING, 4, msgbuf, "");
|
||||
|
||||
//CHAR_talkToCli( angelindex, -1, "天之声:非常感谢你答应帮忙,那我就将信物交给你了,请将勇者的信物转交给勇者。", CHAR_COLORYELLOW);
|
||||
|
||||
lssproto_WN_send( getfdFromCharaIndex(angelindex), WINDOW_MESSAGETYPE_MESSAGE,
|
||||
WINDOW_BUTTONTYPE_YES, -1, -1,
|
||||
"非常感谢你答应帮忙,那我就将信物交给你了,请将勇者的信物转交给勇者。");
|
||||
|
||||
#ifdef _ANGLE_EMAIL
|
||||
int maxchar = CHAR_getPlayerMaxNum();
|
||||
int i;
|
||||
for( i =0; i <maxchar; i++)
|
||||
{
|
||||
if( !CHAR_CHECKINDEX( i) ) continue;
|
||||
if( CHAR_getInt( i, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) continue;
|
||||
if( strcmp( herocdkey, CHAR_getChar( i, CHAR_CDKEY)) ) continue;
|
||||
if( strcmp( heroname, CHAR_getChar( i, CHAR_NAME)) ) continue;
|
||||
|
||||
if( ADDRESSBOOK_AutoaddAddressBook( angelindex, i) == TRUE ){
|
||||
char token[256];
|
||||
sprintf( token, "系统自动为你和英雄 %s 交换名片。", CHAR_getChar( i, CHAR_NAME ));
|
||||
CHAR_talkToCli( angelindex, -1, token, CHAR_COLORRED);
|
||||
}
|
||||
|
||||
if( ADDRESSBOOK_AutoaddAddressBook( i, angelindex) == TRUE ){
|
||||
char token[256];
|
||||
sprintf( token, "系统自动为你和使者 %s 交换名片。", CHAR_getChar( angelindex, CHAR_NAME ));
|
||||
CHAR_talkToCli( i, -1, token, CHAR_COLORRED);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
sprintf( msgbuf, " 使者答应帮忙了 i:%d 使者:%s 勇者:%s ci=%d ", mindex, missiontable[mindex].angelinfo, missiontable[mindex].heroinfo, angelindex);
|
||||
print( msgbuf);
|
||||
LogAngel( msgbuf);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
// 使用使者信物时
|
||||
void Use_AngelToken( int charaindex, int toindex, int haveitemindex )
|
||||
{
|
||||
int itemindex;
|
||||
char nameinfo[1024];
|
||||
int mindex;
|
||||
char msg[1024];
|
||||
char tokenbuf[64];
|
||||
|
||||
print(" 使用使者信物 ");
|
||||
|
||||
if( !CHAR_CHECKINDEX( charaindex) ) return;
|
||||
itemindex = CHAR_getItemIndex( charaindex, haveitemindex);
|
||||
if( !ITEM_CHECKINDEX( itemindex) ) return;
|
||||
|
||||
mindex = checkIfAngel( charaindex);
|
||||
//sprintf( nameinfo, "%s:%s", CHAR_getChar(charaindex, CHAR_CDKEY), CHAR_getChar(charaindex, CHAR_NAME));
|
||||
getMissionNameInfo( charaindex, nameinfo);
|
||||
|
||||
if( mindex == -1 ||
|
||||
( strcmp( nameinfo, ITEM_getChar( itemindex, ITEM_ANGELINFO)) && strcmp( nameinfo, ITEM_getChar( itemindex, ITEM_HEROINFO)) ) ) {
|
||||
// 路人甲使用时
|
||||
CHAR_talkToCli( charaindex, -1, "这并不是属於你的信物,不可随便使用喔。", CHAR_COLORRED);
|
||||
return;
|
||||
}
|
||||
|
||||
if( strcmp( ITEM_getChar( itemindex, ITEM_ANGELINFO), missiontable[mindex].angelinfo)
|
||||
|| strcmp( ITEM_getChar( itemindex, ITEM_HEROINFO), missiontable[mindex].heroinfo) ) {
|
||||
|
||||
CHAR_talkToCli( charaindex, -1, "这是无用的信物,还是丢掉吧。", CHAR_COLORRED);
|
||||
return;
|
||||
}
|
||||
|
||||
if( !strcmp( nameinfo, missiontable[mindex].angelinfo) ) { // 使者使用时
|
||||
|
||||
int lefttime, hour, min;
|
||||
lefttime = missiontable[mindex].time + missiontable[mindex].limittime*60*60 - (int)time(NULL);
|
||||
hour = lefttime / (60*60);
|
||||
min = (lefttime % (60*60)) / 60;
|
||||
if( missiontable[mindex].flag == MISSION_DOING ) {
|
||||
// 显示任务资料
|
||||
getStringFromIndexWithDelim( missiontable[mindex].heroinfo, ":", 2, tokenbuf, sizeof(tokenbuf));
|
||||
sprintf( msg, "你的使命是将勇者的信物交给 %s ,%s,时间还剩余%d小时%d分。",
|
||||
tokenbuf, missionlist[missiontable[mindex].mission].detail, hour, min);
|
||||
CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORRED);
|
||||
}
|
||||
else if( missiontable[mindex].flag == MISSION_HERO_COMPLETE ) {
|
||||
// 可以去领奖了
|
||||
getStringFromIndexWithDelim( missiontable[mindex].heroinfo, ":", 2, tokenbuf, sizeof(tokenbuf));
|
||||
sprintf( msg, "勇者 %s 的使命已经完成了,你可以去领奖了,时间还剩余%d小时%d分。",
|
||||
tokenbuf, hour, min);
|
||||
CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORRED);
|
||||
}
|
||||
else if( missiontable[mindex].flag == MISSION_TIMEOVER ) {
|
||||
// 时间超过了
|
||||
sprintf( msg, "很可惜,使者和勇者并没有在时限内完成使命,下次再加油吧。");
|
||||
CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORRED);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if( !strcmp( nameinfo, missiontable[mindex].heroinfo) ) { // 勇者使用时
|
||||
// 传送至使者身旁
|
||||
int maxchar, i;
|
||||
char cdkey[64], name[64];
|
||||
int fl =0, fx =0, fy =0;
|
||||
|
||||
if( checkUnlawWarpFloor( CHAR_getInt( charaindex, CHAR_FLOOR) ) ) {
|
||||
CHAR_talkToCli( charaindex, -1, "你所在的地方无法传送。", CHAR_COLORYELLOW );
|
||||
return;
|
||||
}
|
||||
|
||||
getStringFromIndexWithDelim( missiontable[mindex].angelinfo, ":", 1, cdkey, sizeof(cdkey));
|
||||
getStringFromIndexWithDelim( missiontable[mindex].angelinfo, ":", 2, name, sizeof(name));
|
||||
maxchar = CHAR_getPlayerMaxNum();
|
||||
for( i =0; i <maxchar; i++)
|
||||
{
|
||||
if( !CHAR_CHECKINDEX( i) ) continue;
|
||||
if( CHAR_getInt( i, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) continue;
|
||||
//sprintf( tempinfo, "%s:%s", CHAR_getChar( i, CHAR_CDKEY), CHAR_getChar( i, CHAR_NAME));
|
||||
if( strcmp( cdkey, CHAR_getChar( i, CHAR_CDKEY)) ) continue;
|
||||
if( strcmp( name, CHAR_getChar( i, CHAR_NAME)) ) continue;
|
||||
|
||||
fl = CHAR_getInt( i, CHAR_FLOOR);
|
||||
fx = CHAR_getInt( i, CHAR_X);
|
||||
fy = CHAR_getInt( i, CHAR_Y);
|
||||
|
||||
if( checkUnlawWarpFloor( fl) ) {
|
||||
CHAR_talkToCli( charaindex, -1, "对象所在的地方无法传送。", CHAR_COLORYELLOW );
|
||||
return;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
if( fl <= 0 )
|
||||
{
|
||||
sprintf( msg, "使者 %s 目前不在线上或不在本伺服器上。", name);
|
||||
CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORRED);
|
||||
return;
|
||||
}
|
||||
|
||||
sprintf( msg, "传送至使者 %s 身边。", name);
|
||||
CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW);
|
||||
CHAR_warpToSpecificPoint( charaindex, fl, fx, fy);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 使用勇者信物时
|
||||
void Use_HeroToken( int charaindex, int toindex, int haveitemindex )
|
||||
{
|
||||
int itemindex;
|
||||
int mindex;
|
||||
char nameinfo[64];
|
||||
char msg[1024];
|
||||
|
||||
// print(" 使用勇者信物 ");
|
||||
|
||||
if( !CHAR_CHECKINDEX( charaindex) ) return;
|
||||
itemindex = CHAR_getItemIndex( charaindex, haveitemindex);
|
||||
if( !ITEM_CHECKINDEX( itemindex) ) return;
|
||||
|
||||
mindex = checkIfAngel( charaindex);
|
||||
//sprintf( nameinfo, "%s:%s", CHAR_getChar(charaindex, CHAR_CDKEY), CHAR_getChar(charaindex, CHAR_NAME));
|
||||
getMissionNameInfo( charaindex, nameinfo);
|
||||
|
||||
if( mindex == -1 ||
|
||||
( strcmp( nameinfo, ITEM_getChar( itemindex, ITEM_ANGELINFO)) && strcmp( nameinfo, ITEM_getChar( itemindex, ITEM_HEROINFO)) ) ) {
|
||||
// 路人甲使用时
|
||||
CHAR_talkToCli( charaindex, -1, "这并不是属於你的信物,不可随便使用喔。", CHAR_COLORRED);
|
||||
return;
|
||||
}
|
||||
|
||||
if( strcmp( ITEM_getChar( itemindex, ITEM_ANGELINFO), missiontable[mindex].angelinfo)
|
||||
|| strcmp( ITEM_getChar( itemindex, ITEM_HEROINFO), missiontable[mindex].heroinfo) ){
|
||||
|
||||
CHAR_talkToCli( charaindex, -1, "这是无用的信物,还是丢掉吧。", CHAR_COLORRED);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if( !strcmp( nameinfo, missiontable[mindex].heroinfo) ) { // 勇者使用时
|
||||
|
||||
int lefttime, hour, min;
|
||||
lefttime = missiontable[mindex].time + missiontable[mindex].limittime*60*60 - (int)time(NULL);
|
||||
hour = lefttime / (60*60);
|
||||
min = (lefttime % (60*60)) / 60;
|
||||
|
||||
if( missiontable[mindex].flag == MISSION_DOING ) {
|
||||
// 显示任务资料
|
||||
sprintf( msg, "你的使命是 %s,时间还剩余%d小时%d分。",
|
||||
missionlist[missiontable[mindex].mission].detail, hour, min);
|
||||
CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORRED);
|
||||
}
|
||||
else if( missiontable[mindex].flag == MISSION_HERO_COMPLETE ) {
|
||||
// 可以去领奖了
|
||||
sprintf( msg, "你的使命已经完成了,可以去领奖了,时间还剩余%d小时%d分。",
|
||||
hour, min);
|
||||
CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORRED);
|
||||
}
|
||||
else if( missiontable[mindex].flag == MISSION_TIMEOVER ) {
|
||||
// 时间超过了
|
||||
sprintf( msg, "很可惜,使者和勇者并没有在时限内完成使命,下次再加油吧。");
|
||||
CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORRED);
|
||||
}
|
||||
return;
|
||||
|
||||
}
|
||||
else if( !strcmp( nameinfo, missiontable[mindex].angelinfo) ) { // 使者使用时
|
||||
// 传送至勇者身旁
|
||||
int maxchar, i;
|
||||
char cdkey[64], name[64];
|
||||
int fl =0, fx =0, fy =0;
|
||||
|
||||
if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE ) {
|
||||
CHAR_talkToCli( charaindex, -1, "组队中无法传送。", CHAR_COLORYELLOW );
|
||||
return;
|
||||
}
|
||||
|
||||
if( checkUnlawWarpFloor( CHAR_getInt( charaindex, CHAR_FLOOR) ) ) {
|
||||
CHAR_talkToCli( charaindex, -1, "你所在的地方无法传送。", CHAR_COLORYELLOW );
|
||||
return;
|
||||
}
|
||||
|
||||
//if( CHAR_CheckInItemForWares( charaindex, 0) == FALSE ){
|
||||
if( CheckDropatLogout( charaindex) == TRUE ) {
|
||||
CHAR_talkToCli( charaindex, -1, "携带登出後消失的道具时无法使用。", CHAR_COLORYELLOW);
|
||||
return;
|
||||
}
|
||||
|
||||
getStringFromIndexWithDelim( missiontable[mindex].heroinfo, ":", 1, cdkey, sizeof(cdkey));
|
||||
getStringFromIndexWithDelim( missiontable[mindex].heroinfo, ":", 2, name, sizeof(name));
|
||||
maxchar = CHAR_getPlayerMaxNum();
|
||||
for( i =0; i <maxchar; i++)
|
||||
{
|
||||
if( !CHAR_CHECKINDEX( i) ) continue;
|
||||
if( CHAR_getInt( i, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) continue;
|
||||
//sprintf( tempinfo, "%s:%s", CHAR_getChar( i, CHAR_CDKEY), CHAR_getChar( i, CHAR_NAME));
|
||||
if( strcmp( cdkey, CHAR_getChar( i, CHAR_CDKEY)) ) continue;
|
||||
if( strcmp( name, CHAR_getChar( i, CHAR_NAME)) ) continue;
|
||||
|
||||
fl = CHAR_getInt( i, CHAR_FLOOR);
|
||||
fx = CHAR_getInt( i, CHAR_X);
|
||||
fy = CHAR_getInt( i, CHAR_Y);
|
||||
|
||||
if( checkUnlawWarpFloor( fl) ) {
|
||||
CHAR_talkToCli( charaindex, -1, "对象所在的地方无法传送过去。", CHAR_COLORYELLOW );
|
||||
return;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
if( fl <= 0 )
|
||||
{
|
||||
sprintf( msg, "勇者 %s 目前不在线上或不在本伺服器上。", name);
|
||||
CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORRED);
|
||||
return;
|
||||
}
|
||||
|
||||
sprintf( msg, "传送至勇者 %s 身边。", name);
|
||||
CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW);
|
||||
CHAR_warpToSpecificPoint( charaindex, fl, fx, fy);
|
||||
|
||||
}
|
||||
else { // 路人甲使用时
|
||||
CHAR_talkToCli( charaindex, -1, "这并不是属於你的信物,不可随便使用喔。", CHAR_COLORRED);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void CHAR_sendAngelMark( int objindex, int flag)
|
||||
{
|
||||
int opt[1];
|
||||
opt[0] = flag;
|
||||
CHAR_sendWatchEvent( objindex,CHAR_ACTANGEL,opt,1,TRUE);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
4678
char/char_base.c
Normal file
4678
char/char_base.c
Normal file
File diff suppressed because it is too large
Load Diff
2040
char/char_data.c
Normal file
2040
char/char_data.c
Normal file
File diff suppressed because it is too large
Load Diff
564
char/char_event.c
Normal file
564
char/char_event.c
Normal file
@ -0,0 +1,564 @@
|
||||
#include "version.h"
|
||||
#include <ctype.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "char.h"
|
||||
#include "item_event.h"
|
||||
#include "net.h"
|
||||
#include "item.h"
|
||||
#include "object.h"
|
||||
#include "lssproto_serv.h"
|
||||
#include "util.h"
|
||||
#include "char_data.h"
|
||||
#include "readmap.h"
|
||||
#include "map_deal.h"
|
||||
#include "item.h"
|
||||
#include "saacproto_cli.h"
|
||||
#include "npccreate.h"
|
||||
#include "handletime.h"
|
||||
#include "anim_tbl.h"
|
||||
#include "family.h"
|
||||
|
||||
#define SPR_kmydam CG_HIT_MARK_00
|
||||
BOOL CHAR_allprewalk( int index,int* dir,int* mode)
|
||||
{
|
||||
int poisonvalue;
|
||||
poisonvalue = CHAR_getInt(index, CHAR_POISON );
|
||||
if( poisonvalue >= 1 ){
|
||||
CHAR_setInt(index,CHAR_HP , CHAR_getInt(index,CHAR_HP)
|
||||
- poisonvalue );
|
||||
CHAR_setWorkInt(index,CHAR_WORKLASTATTACKCHARAINDEX,-2);
|
||||
{
|
||||
int opt[2] = { SPR_kmydam,poisonvalue};
|
||||
CHAR_sendWatchEvent( CHAR_getWorkInt(index,CHAR_WORKOBJINDEX),
|
||||
CHAR_ACTDAMAGE,opt,2,TRUE);
|
||||
|
||||
CHAR_sendStatusString( index,"M");
|
||||
}
|
||||
poisonvalue--;
|
||||
if( poisonvalue <= 0)poisonvalue = 1;
|
||||
CHAR_setInt(index,CHAR_POISON,poisonvalue);
|
||||
}
|
||||
if( CHAR_getInt(index,CHAR_CONFUSION) != 0 )
|
||||
*dir = RAND(0,7);
|
||||
if( CHAR_getInt(index,CHAR_STONE) != 0 )
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CHAR_allpostwalk( int index )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
BOOL CHAR_makeCADefaultString( int objindex,char* buf,int buflen, int act )
|
||||
{
|
||||
char objindexbuf[64];
|
||||
/* 民尼永弁 */
|
||||
if( CHECKOBJECT(objindex) == FALSE ) return FALSE;
|
||||
if( OBJECT_getType(objindex) != OBJTYPE_CHARA ) return FALSE;
|
||||
snprintf( buf,buflen,"%s|%d|%d|%d|%d",
|
||||
cnv10to62( objindex,objindexbuf, sizeof(objindexbuf)),
|
||||
OBJECT_getX(objindex), OBJECT_getY(objindex),
|
||||
act,
|
||||
CHAR_getInt(OBJECT_getIndex(objindex),CHAR_DIR));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void CHAR_makeCADAMAGEStringFromSpecifiedCoordinate(
|
||||
int x , int y, char* buf,int buflen,int ef1,int damagevalue )
|
||||
{
|
||||
snprintf( buf,buflen,"%d|%d|%d|%d|%d|%d|%d",
|
||||
-1,x,y, CHAR_ACTDAMAGE,0, ef1,damagevalue);
|
||||
}
|
||||
|
||||
BOOL CHAR_makeCAOPT1String( int objindex,char* buf, int buflen, int act,int opt1 )
|
||||
{
|
||||
char objindexbuf[64];
|
||||
if( CHECKOBJECT(objindex) == FALSE ) return FALSE;
|
||||
if( OBJECT_getType(objindex) != OBJTYPE_CHARA ) return FALSE;
|
||||
snprintf( buf,buflen,"%s|%d|%d|%d|%d|%d",
|
||||
cnv10to62( objindex,objindexbuf, sizeof(objindexbuf)),
|
||||
OBJECT_getX(objindex), OBJECT_getY(objindex),
|
||||
act,
|
||||
CHAR_getInt(OBJECT_getIndex(objindex),CHAR_DIR), opt1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef _STREET_VENDOR
|
||||
BOOL CHAR_makeCAOPTString(int objindex,char* buf,int buflen,int act,char *string)
|
||||
{
|
||||
char objindexbuf[64];
|
||||
|
||||
if(CHECKOBJECT(objindex) == FALSE ) return FALSE;
|
||||
if(OBJECT_getType(objindex) != OBJTYPE_CHARA ) return FALSE;
|
||||
snprintf( buf,buflen,"%s|%d|%d|%d|%d|%s",
|
||||
cnv10to62(objindex,objindexbuf, sizeof(objindexbuf)),
|
||||
OBJECT_getX(objindex), OBJECT_getY(objindex),act,
|
||||
CHAR_getInt(OBJECT_getIndex(objindex),CHAR_DIR),string);
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOL CHAR_makeCAOPT3String( int objindex,char* buf, int buflen, int act,int opt1,int opt2,int opt3 )
|
||||
{
|
||||
char objindexbuf[64];
|
||||
|
||||
if( CHECKOBJECT(objindex) == FALSE ) return FALSE;
|
||||
if( OBJECT_getType(objindex) != OBJTYPE_CHARA ) return FALSE;
|
||||
snprintf( buf,buflen,"%s|%d|%d|%d|%d|%d|%d|%d",
|
||||
cnv10to62( objindex,objindexbuf, sizeof(objindexbuf)),
|
||||
OBJECT_getX(objindex), OBJECT_getY(objindex),
|
||||
act,
|
||||
CHAR_getInt(OBJECT_getIndex(objindex),CHAR_DIR),
|
||||
opt1,opt2,opt3);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CHAR_playerWatchfunc( int objmeindex, int objmoveindex,
|
||||
CHAR_ACTION act, int x, int y, int dir, int* opt, int optlen )
|
||||
{
|
||||
int fd;
|
||||
int meindex;
|
||||
if( !CHECKOBJECTUSE(objmeindex) )return;
|
||||
if( !CHECKOBJECTUSE(objmoveindex))return;
|
||||
if( OBJECT_getType(objmeindex) != OBJTYPE_CHARA )return;
|
||||
|
||||
meindex = OBJECT_getIndex(objmeindex);
|
||||
if( CHAR_getInt( meindex,CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER )return;
|
||||
|
||||
fd = getfdFromCharaIndex( meindex );
|
||||
if( fd == -1 )return;
|
||||
switch( OBJECT_getType(objmoveindex) ){
|
||||
case OBJTYPE_CHARA:
|
||||
{
|
||||
char buf[128];
|
||||
if( !CHAR_getFlg( OBJECT_getIndex(objmoveindex),CHAR_ISVISIBLE) )
|
||||
return;
|
||||
|
||||
switch( act ){
|
||||
case CHAR_ACTSTAND:
|
||||
case CHAR_ACTWALK:
|
||||
case CHAR_ACTATTACK:
|
||||
case CHAR_ACTDEAD:
|
||||
case CHAR_ACTMAGIC:
|
||||
case CHAR_ACTITEM:
|
||||
case CHAR_ACTDOWN:
|
||||
case CHAR_ACTSIT:
|
||||
case CHAR_ACTHAND:
|
||||
case CHAR_ACTPLEASURE:
|
||||
case CHAR_ACTANGRY:
|
||||
case CHAR_ACTSAD:
|
||||
case CHAR_ACTDAMAGE:
|
||||
case CHAR_ACTGUARD:
|
||||
case CHAR_ACTTURN:
|
||||
case CHAR_ACTWARP:
|
||||
case CHAR_ACTACTIONWALK:
|
||||
case CHAR_ACTNOD:
|
||||
case CHAR_ACTTHROW:
|
||||
case CHAR_ACTACTIONSTAND:
|
||||
if( CHAR_makeCADefaultString(objmoveindex,buf,sizeof(buf),act) ) {
|
||||
CONNECT_appendCAbuf( fd,buf,strlen(buf));
|
||||
}
|
||||
break;
|
||||
// shan begin
|
||||
case CHAR_ACTTRADE:
|
||||
if( optlen == 1 )
|
||||
if( CHAR_makeCAOPT1String( objmoveindex, buf,
|
||||
sizeof( buf), act, opt[0] ) )
|
||||
CONNECT_appendCAbuf( fd, buf, strlen(buf));
|
||||
break;
|
||||
|
||||
#ifdef _ANGEL_SUMMON
|
||||
case CHAR_ACTANGEL:
|
||||
if( optlen == 1 )
|
||||
if( CHAR_makeCAOPT1String( objmoveindex, buf,
|
||||
sizeof( buf), act, opt[0] ) )
|
||||
CONNECT_appendCAbuf( fd, buf, strlen(buf));
|
||||
break;
|
||||
#endif
|
||||
|
||||
// shan end
|
||||
#ifdef _MIND_ICON
|
||||
case CHAR_MIND:
|
||||
if( optlen == 1 )
|
||||
if( CHAR_makeCAOPT1String( objmoveindex, buf,
|
||||
sizeof(buf), act, opt[0]))
|
||||
CONNECT_appendCAbuf( fd, buf, strlen(buf));
|
||||
break;
|
||||
#endif
|
||||
#ifdef _STREET_VENDOR
|
||||
case CHAR_STREETVENDOR_OPEN:
|
||||
if(CHAR_makeCAOPTString(objmoveindex,buf,sizeof(buf),
|
||||
act,CHAR_getWorkChar(OBJECT_getIndex(objmoveindex),CHAR_STREETVENDOR_NAME)))
|
||||
CONNECT_appendCAbuf(fd,buf,strlen(buf));
|
||||
break;
|
||||
case CHAR_STREETVENDOR_CLOSE:
|
||||
if(CHAR_makeCAOPTString(objmoveindex,buf,sizeof(buf),
|
||||
act,CHAR_getWorkChar(OBJECT_getIndex(objmoveindex),CHAR_STREETVENDOR_NAME)))
|
||||
CONNECT_appendCAbuf(fd,buf,strlen(buf));
|
||||
break;
|
||||
#endif
|
||||
#ifdef _ITEM_CRACKER
|
||||
case CHAR_ITEM_CRACKER:
|
||||
if( optlen == 1 )
|
||||
if( CHAR_makeCAOPT1String( objmoveindex, buf,
|
||||
sizeof(buf), act, opt[0]))
|
||||
CONNECT_appendCAbuf( fd, buf, strlen(buf));
|
||||
break;
|
||||
#endif
|
||||
case CHAR_ACTEFFECT:
|
||||
if( optlen == 1 )
|
||||
if( CHAR_makeCAOPT1String(objmoveindex,buf,
|
||||
sizeof(buf),act,opt[0] ) )
|
||||
CONNECT_appendCAbuf( fd,buf,strlen(buf));
|
||||
break;
|
||||
case CHAR_ACTPOPUPNAME:
|
||||
case CHAR_ACTLEADER:
|
||||
case CHAR_ACTBATTLEWATCH:
|
||||
if( optlen == 1 )
|
||||
if( CHAR_makeCAOPT1String(objmoveindex,buf,
|
||||
sizeof(buf),act,opt[0] ) )
|
||||
CONNECT_appendCAbuf( fd,buf,strlen(buf));
|
||||
break;
|
||||
case CHAR_ACTBATTLE:
|
||||
if( optlen == 3 )
|
||||
if( CHAR_makeCAOPT3String( objmoveindex,buf, sizeof(buf),
|
||||
act,opt[0],opt[1],opt[2] ) )
|
||||
CONNECT_appendCAbuf( fd,buf,strlen(buf));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case OBJTYPE_ITEM:
|
||||
case OBJTYPE_GOLD:
|
||||
CHAR_sendSpecifiedobjindexCToCharaindex(meindex,objmoveindex);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CHAR_sendWallDamage( int charaindex,int x, int y, int damage )
|
||||
{
|
||||
int fd;
|
||||
char cabuf[256]="";
|
||||
|
||||
fd = getfdFromCharaIndex(charaindex);
|
||||
if( fd == -1 )return;
|
||||
|
||||
CHAR_makeCADAMAGEStringFromSpecifiedCoordinate(
|
||||
x,y,cabuf,sizeof(cabuf),SPR_kmydam,damage );
|
||||
CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf));
|
||||
}
|
||||
|
||||
|
||||
|
||||
static struct ParamShow
|
||||
{
|
||||
int paramindex; /* 由仿丢□正及奶件犯永弁旦 */
|
||||
char* offmessage; /* 匀凶凛及丢永本□斥 侬 */
|
||||
}pShow[]={
|
||||
{CHAR_PARALYSIS, CHAR_RECOVERPARALYSISSTRING},
|
||||
{CHAR_SLEEP, CHAR_RECOVERSILENCESTRING},
|
||||
{CHAR_STONE, CHAR_RECOVERSTONESTRING},
|
||||
{CHAR_DRUNK, CHAR_RECOVERDARKNESSSTRING},
|
||||
{CHAR_CONFUSION, CHAR_RECOVERCONFUSIONSTRING},
|
||||
};
|
||||
|
||||
void CHAR_recoveryStatus( int charaindex )
|
||||
{
|
||||
int i;
|
||||
int cure=FALSE;
|
||||
if( !CHAR_CHECKINDEX(charaindex) )return;
|
||||
|
||||
for( i=0 ; i < arraysizeof(pShow) ; i ++ ){
|
||||
if( CHAR_getInt(charaindex,pShow[i].paramindex) > 0 ){
|
||||
int old;
|
||||
old = CHAR_setInt(charaindex,pShow[i].paramindex,
|
||||
CHAR_getInt(charaindex,
|
||||
pShow[i].paramindex) - 1 );
|
||||
if( old == 1 ){
|
||||
if( CHAR_getInt(charaindex,CHAR_WHICHTYPE) == CHAR_TYPEPLAYER){
|
||||
CHAR_talkToCli( charaindex,-1, pShow[i].offmessage,
|
||||
CHAR_COLORWHITE );
|
||||
}
|
||||
cure = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( cure ){
|
||||
CHAR_sendStatusString( charaindex, "P" );
|
||||
CHAR_sendCToArroundCharacter( CHAR_getWorkInt(
|
||||
charaindex, CHAR_WORKOBJINDEX) );
|
||||
}
|
||||
}
|
||||
|
||||
static BOOL CHAR_clairvoyance_gold(int objindex,char* buf )
|
||||
{
|
||||
if( OBJECT_getType( objindex ) == OBJTYPE_GOLD ){
|
||||
*buf = 'G';
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static BOOL CHAR_clairvoyance_item(int objindex,char* buf )
|
||||
{
|
||||
if( OBJECT_getType( objindex ) == OBJTYPE_ITEM){
|
||||
*buf = 'I';
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static BOOL CHAR_clairvoyance_player(int objindex,char* buf )
|
||||
{
|
||||
if( OBJECT_getType( objindex ) == OBJTYPE_CHARA
|
||||
&& CHAR_getInt(OBJECT_getIndex(objindex),CHAR_WHICHTYPE)
|
||||
== CHAR_TYPEPLAYER ){
|
||||
*buf = 'P';
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static BOOL CHAR_clairvoyance_enemy(int objindex,char* buf )
|
||||
{
|
||||
if( OBJECT_getType( objindex ) == OBJTYPE_CHARA
|
||||
&& CHAR_getInt(OBJECT_getIndex(objindex),CHAR_WHICHTYPE)
|
||||
== CHAR_TYPEENEMY ){
|
||||
*buf = 'E';
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static char CHAR_clairvoyanceString[STRINGBUFSIZ];
|
||||
|
||||
static void CHAR_clairvoyance( int charaindex )
|
||||
{
|
||||
char onebuf[128];
|
||||
int stringlen=0;
|
||||
int clairvoyancelevel;
|
||||
int centerx,centery,fl;
|
||||
int i,j;
|
||||
BOOL sendclairvoyance=FALSE;
|
||||
|
||||
#define CHAR_CLAIRVOYANCEWIDTH 81
|
||||
BOOL (*clairvoyancefunc[])(int,char*) ={
|
||||
CHAR_clairvoyance_gold,
|
||||
CHAR_clairvoyance_item,
|
||||
CHAR_clairvoyance_player,
|
||||
CHAR_clairvoyance_enemy,
|
||||
};
|
||||
if( CHAR_getWorkInt( charaindex, CHAR_WORKLOOPSTARTSEC)%10 != 0 )
|
||||
return;
|
||||
|
||||
clairvoyancelevel = CHAR_getInt(charaindex,CHAR_RADARSTRENGTH );
|
||||
|
||||
if( clairvoyancelevel <= 0 )return;
|
||||
if( clairvoyancelevel > arraysizeof( clairvoyancefunc ) )
|
||||
clairvoyancelevel = arraysizeof( clairvoyancefunc );
|
||||
|
||||
centerx = CHAR_getInt(charaindex,CHAR_X);
|
||||
centery = CHAR_getInt(charaindex,CHAR_Y);
|
||||
fl = CHAR_getInt(charaindex,CHAR_FLOOR);
|
||||
|
||||
|
||||
for( i = centerx - CHAR_CLAIRVOYANCEWIDTH/2 ;
|
||||
i < centerx + CHAR_CLAIRVOYANCEWIDTH/2 ; i ++ ){
|
||||
for( j = centery - CHAR_CLAIRVOYANCEWIDTH/2 ;
|
||||
j < centery + CHAR_CLAIRVOYANCEWIDTH/2 ; j ++ ){
|
||||
OBJECT object;
|
||||
for( object = MAP_getTopObj(fl,i,j) ; object ;
|
||||
object = NEXT_OBJECT( object ) ){
|
||||
int objindex = GET_OBJINDEX(object);
|
||||
int loop;
|
||||
|
||||
if( OBJECT_getType(objindex) == OBJTYPE_NOUSE )continue;
|
||||
if( OBJECT_getType(objindex) == OBJTYPE_CHARA
|
||||
&& OBJECT_getIndex(objindex) == charaindex) continue;
|
||||
for( loop = 0 ; loop < clairvoyancelevel ; loop ++ ){
|
||||
BOOL ret;
|
||||
char id;
|
||||
ret = clairvoyancefunc[loop](objindex,&id);
|
||||
if( ret == TRUE ){
|
||||
sendclairvoyance=TRUE;
|
||||
snprintf( onebuf,sizeof(onebuf),
|
||||
"%d|%d|%c|",i,j,id );
|
||||
strcpysafe( CHAR_clairvoyanceString + stringlen,
|
||||
sizeof(CHAR_clairvoyanceString)
|
||||
- stringlen, onebuf);
|
||||
stringlen += strlen(onebuf);
|
||||
if( stringlen > sizeof(CHAR_clairvoyanceString) )
|
||||
goto RETURN;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RETURN:
|
||||
if( stringlen >= 1 ){
|
||||
int fd;
|
||||
fd = getfdFromCharaIndex( charaindex );
|
||||
dchop( CHAR_clairvoyanceString, "|" );
|
||||
if( fd != -1 )
|
||||
lssproto_R_send( fd, CHAR_clairvoyanceString );
|
||||
}else if( !sendclairvoyance ){
|
||||
int fd;
|
||||
fd = getfdFromCharaIndex( charaindex );
|
||||
if( fd != -1 )
|
||||
lssproto_R_send( fd, "" );
|
||||
}
|
||||
}
|
||||
|
||||
void CHAR_loopFunc( int charaindex )
|
||||
{
|
||||
CHAR_recoveryStatus( charaindex );
|
||||
CHAR_clairvoyance( charaindex );
|
||||
}
|
||||
|
||||
void CHAR_playerresurrect( int charaindex, int hp )
|
||||
{
|
||||
CHAR_setInt(charaindex,CHAR_BASEIMAGENUMBER,
|
||||
CHAR_getInt(charaindex,CHAR_BASEBASEIMAGENUMBER));
|
||||
CHAR_setFlg(charaindex,CHAR_ISDIE, 0);
|
||||
CHAR_setFlg(charaindex,CHAR_ISATTACKED, 1);
|
||||
CHAR_setFlg(charaindex,CHAR_ISOVERED, 0);
|
||||
if( hp >= CHAR_getWorkInt(charaindex,CHAR_WORKMAXHP) )
|
||||
hp = CHAR_getWorkInt(charaindex,CHAR_WORKMAXHP);
|
||||
else if( hp <= 0 )
|
||||
hp = 1;
|
||||
CHAR_setInt(charaindex,CHAR_HP, hp);
|
||||
}
|
||||
|
||||
int CHAR_die( int charaindex )
|
||||
{
|
||||
CHAR_DischargeParty( charaindex, 0);
|
||||
{
|
||||
int bymonster = 0;
|
||||
int attackindex = CHAR_getWorkInt(charaindex,
|
||||
CHAR_WORKLASTATTACKCHARAINDEX);
|
||||
if( attackindex == -2 )
|
||||
bymonster = 0;
|
||||
else if( CHAR_CHECKINDEX(attackindex) == TRUE ){
|
||||
if( CHAR_getInt(attackindex,CHAR_WHICHTYPE)
|
||||
== CHAR_TYPEENEMY ){
|
||||
bymonster = 1;
|
||||
}else{
|
||||
bymonster = 2;
|
||||
}
|
||||
}
|
||||
if( bymonster == 0 || bymonster == 1 ){
|
||||
int i;
|
||||
for( i=0 ; i<CHAR_EQUIPPLACENUM ; i++ )
|
||||
CHAR_DropItem(charaindex,i);
|
||||
}else{
|
||||
int eqindex[CHAR_EQUIPPLACENUM];
|
||||
int itemhavenum=0;
|
||||
int i;
|
||||
|
||||
for( i=0 ; i<CHAR_EQUIPPLACENUM ; i++ )
|
||||
if( ITEM_CHECKINDEX(CHAR_getItemIndex(charaindex,i)) )
|
||||
eqindex[itemhavenum++] = i;
|
||||
|
||||
if( itemhavenum >= 1 ){
|
||||
int randomindex = RAND(0,itemhavenum-1);
|
||||
CHAR_DropItem(charaindex,eqindex[randomindex]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
CHAR_DropMoney(charaindex,
|
||||
CHAR_getInt(charaindex,CHAR_GOLD)/2 );
|
||||
CHAR_setInt(charaindex,CHAR_GOLD,0);
|
||||
}
|
||||
CHAR_complianceParameter(charaindex);
|
||||
CHAR_sendCToArroundCharacter( CHAR_getWorkInt(charaindex, CHAR_WORKOBJINDEX) );
|
||||
CHAR_setInt(charaindex,CHAR_DEADCOUNT,
|
||||
CHAR_getInt(charaindex,CHAR_DEADCOUNT)+1);
|
||||
{
|
||||
int i;
|
||||
BOOL old=FALSE;
|
||||
for( i=0 ; i<arraysizeof(pShow);i++)
|
||||
if( CHAR_setInt( charaindex, pShow[i].paramindex, 0 ) > 0 ){
|
||||
old = TRUE;
|
||||
}
|
||||
if( CHAR_setInt( charaindex, CHAR_POISON, 0 ) > 0 )old=TRUE;
|
||||
if( old )
|
||||
CHAR_sendCToArroundCharacter( CHAR_getInt(charaindex, CHAR_WORKOBJINDEX));
|
||||
}
|
||||
CHAR_sendStatusString( charaindex, "P");
|
||||
CHAR_sendStatusString( charaindex, "I");
|
||||
CHAR_setFlg(charaindex,CHAR_ISDIE,1);
|
||||
CHAR_setFlg(charaindex,CHAR_ISATTACKED,0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CHAR_playerTalkedfunc( int charaindex, int talkindex,char* message, int color, int channel )
|
||||
{
|
||||
int fd;
|
||||
char lastbuf[4096];
|
||||
char mesgbuf[4096];
|
||||
char escapebuf[4096];
|
||||
int fmindex = CHAR_getInt( charaindex, CHAR_FMINDEX );
|
||||
fd = getfdFromCharaIndex( charaindex );
|
||||
if( fd == -1 )return;
|
||||
if( (channel>-1) && (fmindex>0) ){
|
||||
if( channel == 0 ){
|
||||
#ifndef _CHANNEL_MODIFY
|
||||
snprintf( lastbuf,sizeof(lastbuf),"P|[族]%s",
|
||||
#else
|
||||
snprintf( lastbuf,sizeof(lastbuf),"P|F|[族]%s",
|
||||
#endif
|
||||
makeEscapeString( CHAR_appendNameAndTitle(talkindex, message, mesgbuf,sizeof(mesgbuf)),
|
||||
escapebuf,sizeof(escapebuf) ));
|
||||
}
|
||||
#ifdef _FMVER21
|
||||
else if( channel == FAMILY_MAXCHANNEL && CHAR_getInt( talkindex, CHAR_FMLEADERFLAG ) == FMMEMBER_LEADER ){
|
||||
#else
|
||||
else if( channel == FAMILY_MAXCHANNEL && CHAR_getInt( talkindex, CHAR_FMLEADERFLAG ) == 1 ){
|
||||
#endif
|
||||
#ifndef _CHANNEL_MODIFY
|
||||
snprintf( lastbuf,sizeof(lastbuf),"P|[族长广播]%s",
|
||||
#else
|
||||
snprintf( lastbuf,sizeof(lastbuf),"P|F|[族长广播]%s",
|
||||
#endif
|
||||
makeEscapeString(CHAR_appendNameAndTitle(talkindex, message,mesgbuf,sizeof(mesgbuf)),
|
||||
escapebuf,sizeof(escapebuf) ));
|
||||
}else{
|
||||
snprintf( lastbuf,sizeof(lastbuf),"P|[%d]%s",channel,
|
||||
makeEscapeString(CHAR_appendNameAndTitle(talkindex, message,mesgbuf,sizeof(mesgbuf)),
|
||||
escapebuf,sizeof(escapebuf) ));
|
||||
}
|
||||
}else{
|
||||
#ifdef _CHANNEL_MODIFY
|
||||
if(CHAR_getFlg(talkindex,CHAR_ISPARTYCHAT) && (CHAR_getWorkInt(talkindex,CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE))
|
||||
snprintf( lastbuf,sizeof(lastbuf),"P|T|[队]%s",
|
||||
makeEscapeString(CHAR_appendNameAndTitle(talkindex, message,mesgbuf,sizeof(mesgbuf)),
|
||||
escapebuf,sizeof(escapebuf) ));
|
||||
else
|
||||
#ifdef _FONT_SIZE
|
||||
snprintf( lastbuf,sizeof(lastbuf),"P|P|%s|%d",
|
||||
makeEscapeString(CHAR_appendNameAndTitle(talkindex, message,mesgbuf,sizeof(mesgbuf)),
|
||||
escapebuf,sizeof(escapebuf) ), CHAR_getWorkInt( talkindex, CHAR_WORKFONTSIZE) );
|
||||
#else
|
||||
snprintf( lastbuf,sizeof(lastbuf),"P|P|%s",
|
||||
makeEscapeString(CHAR_appendNameAndTitle(talkindex, message,mesgbuf,sizeof(mesgbuf)),
|
||||
escapebuf,sizeof(escapebuf) ));
|
||||
#endif
|
||||
|
||||
#else
|
||||
snprintf( lastbuf,sizeof(lastbuf),"P|%s",
|
||||
makeEscapeString(CHAR_appendNameAndTitle(talkindex, message,mesgbuf,sizeof(mesgbuf)),
|
||||
escapebuf,sizeof(escapebuf) ));
|
||||
#endif
|
||||
}
|
||||
lssproto_TK_send( fd, CHAR_getWorkInt( talkindex, CHAR_WORKOBJINDEX ),lastbuf, color);
|
||||
}
|
2774
char/char_item.c
Normal file
2774
char/char_item.c
Normal file
File diff suppressed because it is too large
Load Diff
735
char/char_party.c
Normal file
735
char/char_party.c
Normal file
@ -0,0 +1,735 @@
|
||||
#include "version.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "readmap.h"
|
||||
#include "object.h"
|
||||
#include "char.h"
|
||||
#include "char_base.h"
|
||||
#include "battle.h"
|
||||
#include "lssproto_serv.h"
|
||||
#include "npcutil.h"
|
||||
#include "npc_bus.h"
|
||||
#include "npc_airplane.h" // Arminius 7.10 Airplane
|
||||
#include "family.h" // shan
|
||||
|
||||
#ifdef _ITEM_QUITPARTY
|
||||
#include "init.h"
|
||||
#endif
|
||||
#ifdef _ALLBLUES_LUA
|
||||
#include "mylua/function.h"
|
||||
#endif
|
||||
// shan add
|
||||
extern struct FM_PKFLOOR fmpkflnum[FAMILY_FMPKFLOOR];
|
||||
|
||||
/*------------------------------------------------------------
|
||||
* 由□ 奴楮 及末□旦
|
||||
------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------
|
||||
* 坞中化中月由□ 奴 毛茧允
|
||||
* 卅仃木壬-1毛忒允[
|
||||
------------------------------------------------------------*/
|
||||
int CHAR_getEmptyPartyArray( int charaindex)
|
||||
{
|
||||
int i = -1;
|
||||
int rc = FALSE;
|
||||
int toindex;
|
||||
if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ) {
|
||||
toindex = charaindex;
|
||||
}
|
||||
else {
|
||||
toindex = CHAR_getPartyIndex( charaindex, 0);
|
||||
}
|
||||
if( CHAR_CHECKINDEX( toindex)){
|
||||
for( i = 1; i < CHAR_PARTYMAX; i ++ ) {
|
||||
if( CHAR_getWorkInt( toindex, i + CHAR_WORKPARTYINDEX1) == -1 ) {
|
||||
rc = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return( rc ? i: -1);
|
||||
}
|
||||
|
||||
int CHAR_getPartyNum( int charaindex)
|
||||
{
|
||||
int i = -1;
|
||||
int rc = FALSE;
|
||||
int toindex;
|
||||
if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ) {
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
toindex = CHAR_getPartyIndex( charaindex, 0);
|
||||
}
|
||||
if( CHAR_CHECKINDEX( toindex)){
|
||||
for( i = 1; i <= CHAR_PARTYMAX; i ++ ) {
|
||||
if(i==CHAR_PARTYMAX) return i;
|
||||
if( CHAR_getWorkInt( toindex, i + CHAR_WORKPARTYINDEX1) == -1 ) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return i;
|
||||
}
|
||||
/*------------------------------------------------------------
|
||||
* 端卞由□ 奴卞 月质
|
||||
*
|
||||
* charaindex int 愤坌
|
||||
* targetindex int 月锹澎及谛
|
||||
------------------------------------------------------------*/
|
||||
BOOL CHAR_JoinParty_Main( int charaindex, int targetindex)
|
||||
{
|
||||
int firstflg = FALSE;
|
||||
int i;
|
||||
char c[3];
|
||||
char buf[64];
|
||||
int toindex;
|
||||
int parray;
|
||||
|
||||
/* 褪互中凶日娄匀舰曰请允 */
|
||||
if( CHAR_getWorkInt( targetindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ) {
|
||||
toindex = targetindex;
|
||||
}
|
||||
else {
|
||||
toindex = CHAR_getPartyIndex( targetindex, 0);
|
||||
if( !CHAR_CHECKINDEX( toindex) ) {
|
||||
print( " %s:%d err\n", __FILE__, __LINE__);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _ALLBLUES_LUA_1_5
|
||||
if(FreePartyJoin(charaindex, toindex) == FALSE){
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
/* 锹澎由□ 奴及谛醒反 井" */
|
||||
parray = CHAR_getEmptyPartyArray( toindex) ;
|
||||
if( parray == -1 ) {
|
||||
print( "%s : %d err\n", __FILE__,__LINE__);
|
||||
return;
|
||||
}
|
||||
|
||||
//组队BUG
|
||||
int pi;
|
||||
for( pi = 0; pi < CHAR_PARTYMAX; pi ++ ) {
|
||||
int index = CHAR_getWorkInt( toindex, pi + CHAR_WORKPARTYINDEX1);
|
||||
if( CHAR_CHECKINDEX(index)) {
|
||||
if(index == charaindex) return; //组队BUG
|
||||
}
|
||||
}
|
||||
#ifdef _WARNPC_CTRL
|
||||
int mapi;
|
||||
for(mapi=0;mapi<10;mapi++){
|
||||
int floorid = getPartyMap(mapi);
|
||||
if(CHAR_getInt(charaindex,CHAR_FLOOR)==floorid){
|
||||
int sameipnum = getMapSameIp(mapi);
|
||||
int partyi;
|
||||
unsigned ip=CONNECT_get_userip(getfdFromCharaIndex(charaindex));
|
||||
unsigned teseip = ip;
|
||||
unsigned toip;
|
||||
int a, b, c, d,ipcnt=1;
|
||||
char ipstr[32];
|
||||
a=(teseip % 0x100); teseip=teseip / 0x100;
|
||||
b=(teseip % 0x100); teseip=teseip / 0x100;
|
||||
c=(teseip % 0x100); teseip=teseip / 0x100;
|
||||
d=(teseip % 0x100);
|
||||
sprintf(ipstr,"%d.%d.%d.%d",a,b,c,d);
|
||||
if(strcmp(ipstr,getNoAttIp(0))==0 || strcmp(ipstr,getNoAttIp(1))==0 || strcmp(ipstr,getNoAttIp(2))==0 || strcmp(ipstr,getNoAttIp(3))==0 || strcmp(ipstr,getNoAttIp(4))==0)
|
||||
break;
|
||||
if( CHAR_getWorkInt( toindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ) {
|
||||
toip=CONNECT_get_userip(getfdFromCharaIndex(toindex));
|
||||
if(ip==toip){
|
||||
ipcnt++;
|
||||
if(ipcnt>sameipnum){
|
||||
CHAR_talkToCli( charaindex, -1, "此地图允许的单IP组队已达上限,无法加入。", CHAR_COLORYELLOW);
|
||||
return;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}else{
|
||||
for( partyi = 0; partyi < CHAR_PARTYMAX; partyi ++ ) {
|
||||
int index = CHAR_getWorkInt( toindex, partyi + CHAR_WORKPARTYINDEX1);
|
||||
if( CHAR_CHECKINDEX(index)) {
|
||||
toip = CONNECT_get_userip(getfdFromCharaIndex(index));
|
||||
if(ip==toip){
|
||||
ipcnt++;
|
||||
if(ipcnt>sameipnum){
|
||||
CHAR_talkToCli( charaindex, -1, "此地图允许的单IP组队已达上限,无法加入。", CHAR_COLORYELLOW);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef _FLOOR_PARTY_CTRL
|
||||
int mapj;
|
||||
for(mapj=1;mapj<=5;mapj++){
|
||||
int floorid = getPartyFloor(mapj);
|
||||
if(CHAR_getInt(charaindex,CHAR_FLOOR)==floorid){
|
||||
time_t timep;
|
||||
struct tm *p;
|
||||
time(&timep);
|
||||
p=localtime(&timep); /*取得当地时间*/
|
||||
int day=p->tm_wday;
|
||||
int hour=p->tm_hour;
|
||||
if(hour < 2) day = day - 1;
|
||||
if(day>5 || day<1) day = 5;
|
||||
int partyi,partycnt=1;
|
||||
if( CHAR_getWorkInt( toindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ) {
|
||||
partycnt++;
|
||||
if(partycnt>day){
|
||||
CHAR_talkToCli( charaindex, -1, "本地图限制组队人数已达上限,周一为1人,周二为2人,周三为3人,周四为4人,其余无限制。", CHAR_COLORYELLOW);
|
||||
return;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}else{
|
||||
for( partyi = 0; partyi < CHAR_PARTYMAX; partyi ++ ) {
|
||||
int index = CHAR_getWorkInt( toindex, partyi + CHAR_WORKPARTYINDEX1);
|
||||
if( CHAR_CHECKINDEX(index)) {
|
||||
partycnt++;
|
||||
if(partycnt>day){
|
||||
CHAR_talkToCli( charaindex, -1, "本地图限制组队人数已达上限,周一为1人,周二为2人,周三为3人,周四为4人,其余无限制。", CHAR_COLORYELLOW);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* 窒手 仄 褪及凛反褪卞卅匀凶CA毛霜耨允月 */
|
||||
if( CHAR_getWorkInt( toindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ) {
|
||||
CHAR_sendLeader( CHAR_getWorkInt( toindex, CHAR_WORKOBJINDEX), 1);
|
||||
/* 锹澎及橇谪及踏五晶尹 */
|
||||
/* 褪卞卅月 */
|
||||
CHAR_setWorkInt( toindex, CHAR_WORKPARTYMODE, 1);
|
||||
CHAR_setWorkInt( toindex, CHAR_WORKPARTYINDEX1, toindex);
|
||||
firstflg = TRUE;
|
||||
}
|
||||
CHAR_setWorkInt( toindex, parray + CHAR_WORKPARTYINDEX1, charaindex);
|
||||
|
||||
CHAR_setWorkChar( charaindex, CHAR_WORKWALKARRAY, "");
|
||||
|
||||
CHAR_setWorkInt( charaindex, CHAR_WORKPARTYMODE, CHAR_PARTY_CLIENT);
|
||||
|
||||
CHAR_setWorkInt( charaindex, CHAR_WORKPARTYINDEX1, toindex);
|
||||
|
||||
if( firstflg ) {
|
||||
CHAR_sendStatusString( toindex, "N0");
|
||||
}
|
||||
|
||||
|
||||
for( i = 0; i < CHAR_PARTYMAX; i ++ ) {
|
||||
int index = CHAR_getWorkInt( toindex, i + CHAR_WORKPARTYINDEX1);
|
||||
if( CHAR_CHECKINDEX(index)) {
|
||||
snprintf( c, sizeof(c), "N%d", i);
|
||||
CHAR_sendStatusString( charaindex, c);
|
||||
}
|
||||
}
|
||||
|
||||
snprintf( buf,sizeof( buf), "%s 加入团队!",
|
||||
CHAR_getChar( charaindex, CHAR_NAME));
|
||||
|
||||
for( i = 0; i < CHAR_PARTYMAX; i ++ ) {
|
||||
int index = CHAR_getWorkInt( toindex, i + CHAR_WORKPARTYINDEX1);
|
||||
if( CHAR_CHECKINDEX(index)) {
|
||||
if( index != charaindex ) {
|
||||
snprintf( c, sizeof(c), "N%d", parray);
|
||||
CHAR_sendStatusString( index, c);
|
||||
CHAR_talkToCli( index, -1, buf, CHAR_COLORYELLOW);
|
||||
}
|
||||
else {
|
||||
CHAR_talkToCli( index, -1, "加入团队!", CHAR_COLORYELLOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*------------------------------------------------------------
|
||||
* 由□ 奴卞 欠丹午允月[
|
||||
------------------------------------------------------------*/
|
||||
BOOL CHAR_JoinParty( int charaindex )
|
||||
{
|
||||
|
||||
int result = -1;
|
||||
int x,y;
|
||||
OBJECT object;
|
||||
int found = FALSE;
|
||||
int fd;
|
||||
int cnt;
|
||||
int i;
|
||||
|
||||
fd = getfdFromCharaIndex( charaindex );
|
||||
if( fd == -1 ) {
|
||||
print( "%s : %d err\n", __FILE__, __LINE__);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* 愤坌互由□ 奴赚氏匹凶日蛲 */
|
||||
if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE ) {
|
||||
lssproto_PR_send( fd, 1, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* 及蟆及甄 毛 月 */
|
||||
CHAR_getCoordinationDir( CHAR_getInt( charaindex, CHAR_DIR ) ,
|
||||
CHAR_getInt( charaindex , CHAR_X ),
|
||||
CHAR_getInt( charaindex , CHAR_Y ) ,
|
||||
1 , &x , &y );
|
||||
|
||||
/* 赓渝祭允月 */
|
||||
for( i = 0; i < CONNECT_WINDOWBUFSIZE; i ++ ) {
|
||||
CONNECT_setJoinpartycharaindex(fd,i,-1);
|
||||
}
|
||||
cnt = 0;
|
||||
|
||||
/*愤坌及 及蟆及平乓仿毛潸 允月 */
|
||||
|
||||
for( object = MAP_getTopObj( CHAR_getInt( charaindex, CHAR_FLOOR),x,y) ;
|
||||
object ;
|
||||
object = NEXT_OBJECT(object ) )
|
||||
{
|
||||
int toindex;
|
||||
int parray;
|
||||
int objindex = GET_OBJINDEX(object);
|
||||
int targetindex = -1;
|
||||
|
||||
/* 平乓仿弁正□元扎卅中 */
|
||||
if( OBJECT_getType( objindex) != OBJTYPE_CHARA) continue;
|
||||
toindex = OBJECT_getIndex( objindex);
|
||||
|
||||
// shan begin
|
||||
if( CHAR_getInt(charaindex, CHAR_FMINDEX) > 0 && CHAR_getInt(toindex, CHAR_FMINDEX) >0){
|
||||
for( i = 0; i < FAMILY_FMPKFLOOR; i++){
|
||||
if( fmpkflnum[i].fl == CHAR_getInt( charaindex, CHAR_FLOOR) )
|
||||
if( CHAR_getInt(charaindex, CHAR_FMINDEX) != CHAR_getInt(toindex, CHAR_FMINDEX) ){
|
||||
lssproto_PR_send( fd, 1, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
// shan end
|
||||
|
||||
/* 皿伊奶乩□及凛 */
|
||||
if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER || CHAR_getInt(toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYERNPC){
|
||||
found = TRUE;
|
||||
/* 锹澎互阂分匀凶日褪毛娄匀舰曰请允 */
|
||||
if( CHAR_getWorkInt( toindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_CLIENT ) {
|
||||
targetindex = CHAR_getWorkInt( toindex, CHAR_WORKPARTYINDEX1);
|
||||
if( !CHAR_CHECKINDEX( targetindex) ) {
|
||||
print( " %s:%d err\n", __FILE__, __LINE__);
|
||||
continue;
|
||||
}
|
||||
if( CHAR_getInt( targetindex, CHAR_WHICHTYPE) == CHAR_TYPEBUS) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else {
|
||||
targetindex = toindex;
|
||||
}
|
||||
|
||||
/* 褪午 ㄠ汹动 卞中月井 */
|
||||
if( NPC_Util_CharDistance( charaindex, targetindex ) > 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* 爵 反匹卅中仪[*/
|
||||
if( CHAR_getWorkInt( targetindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE ){
|
||||
continue;
|
||||
}
|
||||
/* 醮棉袱第乒□玉井 */
|
||||
if( !CHAR_getFlg( targetindex, CHAR_ISPARTY) ) continue;
|
||||
|
||||
#ifdef _ANGEL_SUMMON
|
||||
if( CHAR_getWorkInt( targetindex, CHAR_WORKANGELMODE) == TRUE) {
|
||||
CHAR_talkToCli( charaindex, -1, "使者不可以当领队。", CHAR_COLORYELLOW);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/* 穴件乒旦田旦互中月凛反]谛棉方曰穸燮允月[ */
|
||||
else if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEBUS ) {
|
||||
targetindex = toindex;
|
||||
cnt = 0;
|
||||
if( !NPC_BusCheckJoinParty( toindex, charaindex, TRUE)) {
|
||||
/* 椭瘀毛 凶今卅井匀凶[醮棉 月及反蔽歹月[谛棉及质 手仄卅中[
|
||||
* 支支仇仄中及匹[
|
||||
*/
|
||||
break;
|
||||
}
|
||||
{ // Arminius 7.10 Airplane
|
||||
int busimg=CHAR_getInt(toindex, CHAR_BASEIMAGENUMBER);
|
||||
if ((busimg!=100355) && (busimg!=100461)) {
|
||||
CHAR_setInt(charaindex,CHAR_BASEIMAGENUMBER,busimg);
|
||||
CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex ,
|
||||
CHAR_WORKOBJINDEX ));
|
||||
// Robin debug 01/11/21
|
||||
if( CHAR_getInt( charaindex, CHAR_RIDEPET) != -1 ) {
|
||||
CHAR_setInt( charaindex, CHAR_RIDEPET, -1);
|
||||
CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_RIDEPET);
|
||||
}
|
||||
/*
|
||||
CHAR_sendPMEToArroundCharacterFLXY(charaindex,
|
||||
CHAR_getInt( charaindex, CHAR_FLOOR),
|
||||
CHAR_getInt( charaindex, CHAR_X),
|
||||
CHAR_getInt( charaindex, CHAR_Y),
|
||||
0,1,CHAR_getInt( charaindex, CHAR_PETMAILEFFECT)
|
||||
);
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
/* 皿伊奶乩□坭反穴件乒旦田旦动陆反 骰允月 */
|
||||
else {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* 锹澎由□ 奴及谛醒反 井" */
|
||||
parray = CHAR_getEmptyPartyArray( targetindex) ;
|
||||
if( parray == -1 ) continue;
|
||||
|
||||
/* 仇仇引匹仁木壬 */
|
||||
CONNECT_setJoinpartycharaindex( fd,cnt,toindex);
|
||||
cnt++;
|
||||
if( cnt == CONNECT_WINDOWBUFSIZE ) break;
|
||||
|
||||
/* 穴件乒旦田旦 苇仄分中]伙□皿毛 仃月[ */
|
||||
if( CHAR_getInt( targetindex, CHAR_WHICHTYPE) == CHAR_TYPEBUS ) break;
|
||||
|
||||
}
|
||||
|
||||
if( cnt == 0 ) {
|
||||
if( found == TRUE) {
|
||||
CHAR_talkToCli( charaindex, -1, "无法加入团队。", CHAR_COLORYELLOW);
|
||||
}
|
||||
result = FALSE;
|
||||
}else if( cnt == 1 ) {
|
||||
#ifdef _AUTO_PK
|
||||
if(CHAR_getInt(charaindex,CHAR_FLOOR)==20000){
|
||||
CHAR_talkToCli( charaindex, -1, "单P系统禁止组队!", CHAR_COLORYELLOW);
|
||||
result = FALSE;
|
||||
}else
|
||||
#endif
|
||||
{
|
||||
CHAR_JoinParty_Main( charaindex, CONNECT_getJoinpartycharaindex(fd,0));
|
||||
result = TRUE;
|
||||
}
|
||||
}else {
|
||||
int strlength;
|
||||
char msgbuf[1024];
|
||||
char escapebuf[2048];
|
||||
strcpy( msgbuf, "1\n和谁组成团队呢?\n");
|
||||
strlength = strlen( msgbuf);
|
||||
for( i = 0;
|
||||
CONNECT_getJoinpartycharaindex( fd,i ) != -1
|
||||
&& i< CONNECT_WINDOWBUFSIZE;
|
||||
i ++ ){
|
||||
char *a = CHAR_getChar(
|
||||
CONNECT_getJoinpartycharaindex(fd,i) , CHAR_NAME);
|
||||
char buf[256];
|
||||
snprintf( buf, sizeof( buf),"%s\n", a);
|
||||
if( strlength + strlen( buf) > arraysizeof( msgbuf)){
|
||||
print( "%s:%d视窗讯息buffer不足。\n",
|
||||
__FILE__,__LINE__);
|
||||
break;
|
||||
}
|
||||
strcpy( &msgbuf[strlength], buf);
|
||||
strlength += strlen(buf);
|
||||
}
|
||||
lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT,
|
||||
WINDOW_BUTTONTYPE_CANCEL,
|
||||
CHAR_WINDOWTYPE_SELECTPARTY,
|
||||
-1,
|
||||
makeEscapeString( msgbuf, escapebuf, sizeof(escapebuf)));
|
||||
|
||||
|
||||
}
|
||||
|
||||
if( result != -1 ) {
|
||||
lssproto_PR_send( fd, 1, result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static BOOL CHAR_DischargePartySub( int charaindex, int msgflg)
|
||||
{
|
||||
char buf[64], c[3];
|
||||
int toindex,flg,i;
|
||||
#ifdef _ITEM_QUITPARTY
|
||||
int j = 0,k;
|
||||
#endif
|
||||
|
||||
|
||||
if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_LEADER ) {
|
||||
int pindex, airplaneflag=0;
|
||||
// Arminius 7.10 Airplane
|
||||
if( CHAR_getInt(charaindex, CHAR_WHICHTYPE) == CHAR_TYPEBUS ) {
|
||||
if ((CHAR_getInt(charaindex, CHAR_BASEIMAGENUMBER) !=100355) &&
|
||||
(CHAR_getInt(charaindex, CHAR_BASEIMAGENUMBER) !=100461)){
|
||||
airplaneflag=1;
|
||||
}
|
||||
}
|
||||
for( i = 0; i < CHAR_PARTYMAX; i ++ ) {
|
||||
pindex = CHAR_getWorkInt( charaindex, i + CHAR_WORKPARTYINDEX1);
|
||||
if( CHAR_CHECKINDEX( pindex) ) {
|
||||
int fd = getfdFromCharaIndex( pindex );
|
||||
#ifdef _PLAYER_NPC
|
||||
if(CHAR_getInt( pindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYERNPC){
|
||||
CHAR_CharaDelete(pindex);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
CHAR_setWorkInt( pindex, CHAR_WORKPARTYINDEX1, -1);
|
||||
CHAR_setWorkInt( pindex, CHAR_WORKPARTYMODE, CHAR_PARTY_NONE);
|
||||
if( msgflg ){
|
||||
CHAR_talkToCli( pindex, -1, "团队已解散!", CHAR_COLORYELLOW);
|
||||
#ifdef _ITEM_QUITPARTY
|
||||
// won fix
|
||||
for( j=0;j<CHAR_MAXITEMHAVE;j++ ){
|
||||
int del_item_index = CHAR_getItemIndex( pindex , j );
|
||||
if( ITEM_CHECKINDEX(del_item_index) ){ //格子内有道具
|
||||
for( k=0;k<itemquitparty_num;k++ ){
|
||||
if( ITEM_getInt( del_item_index, ITEM_ID) == atoi(Disappear_Item[k].string) ){ //若等於所设定的道具ID
|
||||
CHAR_setItemIndex( pindex, j, -1); //格子内道具消失
|
||||
ITEM_endExistItemsOne( del_item_index );
|
||||
CHAR_sendItemDataOne( pindex, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if( fd != -1 ) {
|
||||
lssproto_PR_send( fd, 0, 1);
|
||||
}
|
||||
// Arminius 7.10 Airplane
|
||||
if (airplaneflag && (CHAR_getInt(pindex,CHAR_WHICHTYPE)!=CHAR_TYPEBUS)) {
|
||||
int bi,bbi,ii,category;
|
||||
bbi=CHAR_getInt(pindex,CHAR_BASEBASEIMAGENUMBER);
|
||||
ii=CHAR_getItemIndex(pindex,CHAR_ARM);
|
||||
if (!ITEM_CHECKINDEX(ii))
|
||||
category=ITEM_FIST;
|
||||
else
|
||||
category=ITEM_getInt(ii,ITEM_TYPE);
|
||||
bi=CHAR_getNewImagenumberFromEquip(bbi,category);
|
||||
if (bi==-1) bi=bbi;
|
||||
CHAR_setInt(pindex,CHAR_BASEIMAGENUMBER,bi);
|
||||
// Robin 0810 debug
|
||||
CHAR_complianceParameter( pindex );
|
||||
CHAR_sendCToArroundCharacter(CHAR_getWorkInt(pindex ,
|
||||
CHAR_WORKOBJINDEX));
|
||||
}
|
||||
}
|
||||
CHAR_setWorkInt( charaindex, i + CHAR_WORKPARTYINDEX1, -1);
|
||||
}
|
||||
CHAR_sendLeader( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), 0);
|
||||
}else if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_CLIENT ) {
|
||||
int myarray = -1;
|
||||
int fd = getfdFromCharaIndex( charaindex );
|
||||
CHAR_setWorkInt( charaindex, CHAR_WORKPARTYMODE, CHAR_PARTY_NONE);
|
||||
toindex = CHAR_getWorkInt( charaindex, CHAR_WORKPARTYINDEX1);
|
||||
if( !CHAR_CHECKINDEX(toindex ) ) return FALSE;
|
||||
if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEBUS ) {
|
||||
NPC_BusCheckAllowItem( toindex, charaindex, TRUE);
|
||||
// Arminius 7.9 Airplane
|
||||
if ((CHAR_getInt( toindex, CHAR_BASEIMAGENUMBER) !=100355) &&
|
||||
(CHAR_getInt( toindex, CHAR_BASEIMAGENUMBER) !=100461)){
|
||||
int bi,bbi,ii,category;
|
||||
|
||||
bbi=CHAR_getInt(charaindex,CHAR_BASEBASEIMAGENUMBER);
|
||||
ii=CHAR_getItemIndex(charaindex,CHAR_ARM);
|
||||
if (!ITEM_CHECKINDEX(ii))
|
||||
category=ITEM_FIST;
|
||||
else
|
||||
category=ITEM_getInt(ii,ITEM_TYPE);
|
||||
bi=CHAR_getNewImagenumberFromEquip(bbi,category);
|
||||
if (bi==-1) bi=bbi;
|
||||
CHAR_setInt(charaindex,CHAR_BASEIMAGENUMBER,bi);
|
||||
|
||||
// Robin 0810 debug
|
||||
CHAR_complianceParameter( charaindex );
|
||||
|
||||
CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX ));
|
||||
if(CHAR_getWorkInt(toindex,CHAR_NPCWORKINT5)==1) {
|
||||
if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER)>=0){
|
||||
int fl,x,y;
|
||||
CHAR_getElderPosition( CHAR_getInt( charaindex, CHAR_LASTTALKELDER),
|
||||
&fl, &x, &y );
|
||||
CHAR_warpToSpecificPoint(charaindex, fl, x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
CHAR_setWorkInt( charaindex, CHAR_WORKPARTYINDEX1, -1);
|
||||
for( i = 0; i < CHAR_PARTYMAX; i ++ ) {
|
||||
int index = CHAR_getWorkInt( toindex, i + CHAR_WORKPARTYINDEX1);
|
||||
if( CHAR_CHECKINDEX(index) ){
|
||||
if( index == charaindex) {
|
||||
myarray = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( myarray == CHAR_PARTYMAX) {
|
||||
print( "DischargeParty(): 真奇怪!");
|
||||
return FALSE;
|
||||
}
|
||||
CHAR_setWorkInt( toindex, CHAR_WORKPARTYINDEX1 + myarray, -1);
|
||||
snprintf( buf,sizeof( buf), "%s 脱离团队!",
|
||||
CHAR_getChar( charaindex, CHAR_NAME));
|
||||
if( msgflg ){
|
||||
CHAR_talkToCli( charaindex, -1, "脱离团队!", CHAR_COLORYELLOW);
|
||||
#ifdef _ITEM_QUITPARTY
|
||||
// won fix
|
||||
for( i=0;i<CHAR_MAXITEMHAVE;i++ ){
|
||||
int del_item_index = CHAR_getItemIndex( charaindex , j );
|
||||
if( ITEM_CHECKINDEX(del_item_index) ){ //格子内有道具
|
||||
for( j=0;j<itemquitparty_num;j++ ){
|
||||
if( ITEM_getInt( del_item_index, ITEM_ID) == atoi(Disappear_Item[j].string) ){ //若等於所设定的道具ID
|
||||
CHAR_setItemIndex( charaindex, i, -1); //格子内道具消失
|
||||
ITEM_endExistItemsOne( del_item_index );
|
||||
CHAR_sendItemDataOne( charaindex, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
snprintf( c, sizeof(c), "N%d", myarray);
|
||||
if( fd != -1 ) {
|
||||
lssproto_PR_send( fd, 0, 1);
|
||||
}
|
||||
for( i = 0; i < CHAR_PARTYMAX; i ++ ) {
|
||||
int index = CHAR_getWorkInt( toindex, i + CHAR_WORKPARTYINDEX1);
|
||||
if( CHAR_CHECKINDEX(index) ){
|
||||
#ifdef _ITEM_QUITPARTY
|
||||
// won fix
|
||||
for( j=0;j<CHAR_MAXITEMHAVE;j++ ){
|
||||
int del_item_index = CHAR_getItemIndex( index , j );
|
||||
if( ITEM_CHECKINDEX(del_item_index) ){ //格子内有道具
|
||||
for( k=0;k<itemquitparty_num;k++ ){
|
||||
if( ITEM_getInt( del_item_index, ITEM_ID) == atoi(Disappear_Item[k].string) ){ //若等於所设定的道具ID
|
||||
CHAR_setItemIndex( index, j, -1); //格子内道具消失
|
||||
ITEM_endExistItemsOne( del_item_index );
|
||||
CHAR_sendItemDataOne( index, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if( msgflg ){
|
||||
CHAR_talkToCli( index, -1, buf, CHAR_COLORYELLOW);
|
||||
}
|
||||
CHAR_sendStatusString( index, c);
|
||||
}
|
||||
}
|
||||
flg = FALSE;
|
||||
for( i = 1; i < CHAR_PARTYMAX; i ++ ) {
|
||||
int index = CHAR_getWorkInt( toindex, i + CHAR_WORKPARTYINDEX1);
|
||||
if( CHAR_CHECKINDEX(index) ){
|
||||
flg = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( !flg) {
|
||||
CHAR_setWorkInt( toindex, CHAR_WORKPARTYMODE, CHAR_PARTY_NONE);
|
||||
CHAR_sendLeader( CHAR_getWorkInt( toindex, CHAR_WORKOBJINDEX), 0);
|
||||
}else {
|
||||
|
||||
POINT start,end;
|
||||
int previndex = toindex;
|
||||
end.x = CHAR_getInt( charaindex, CHAR_X);
|
||||
end.y = CHAR_getInt( charaindex, CHAR_Y);
|
||||
for( i = 1; i < CHAR_PARTYMAX; i ++ ) {
|
||||
int index = CHAR_getWorkInt( toindex, i + CHAR_WORKPARTYINDEX1);
|
||||
if( CHAR_CHECKINDEX( index) ) {
|
||||
if( NPC_Util_CharDistance( index, previndex) > 1) {
|
||||
int parent_dir;
|
||||
start.x = CHAR_getInt( index, CHAR_X);
|
||||
start.y = CHAR_getInt( index, CHAR_Y);
|
||||
parent_dir = NPC_Util_getDirFromTwoPoint( &start,&end );
|
||||
end = start;
|
||||
if( parent_dir != -1 ) {
|
||||
CHAR_walk( index, parent_dir, 0);
|
||||
}
|
||||
}
|
||||
previndex = index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
BOOL CHAR_DischargeParty( int charaindex, int flg)
|
||||
{
|
||||
return CHAR_DischargePartySub( charaindex, 1);
|
||||
}
|
||||
|
||||
BOOL CHAR_DischargePartyNoMsg( int charaindex)
|
||||
{
|
||||
return CHAR_DischargePartySub( charaindex, 0);
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------
|
||||
* 愤坌互伉□母□井升丹井毛霜耨允月[
|
||||
------------------------------------------------------------*/
|
||||
void CHAR_sendLeader( int objindex, int leader)
|
||||
{
|
||||
int opt[1];
|
||||
opt[0] = leader;
|
||||
CHAR_sendWatchEvent( objindex,CHAR_ACTLEADER,opt,1,TRUE);
|
||||
}
|
||||
/*------------------------------------------------------------
|
||||
* 醮棉毛赐 CHAR_WORKPARTYINDEX)隙烂匹平乓仿index毛娄匀舰月[
|
||||
* 愤坌互褪匹手阂匹手 [
|
||||
------------------------------------------------------------*/
|
||||
int CHAR_getPartyIndex( int index, int num)
|
||||
{
|
||||
int nindex = -1;
|
||||
|
||||
/* 醮棉及奶件犯永弁旦毛潸 */
|
||||
/* 褪及桦宁 */
|
||||
if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE) == CHAR_PARTY_LEADER ) {
|
||||
nindex = CHAR_getWorkInt( index, CHAR_WORKPARTYINDEX1 + num );
|
||||
}
|
||||
/* 阂及桦宁 */
|
||||
else {
|
||||
int oyaindex = CHAR_getWorkInt( index, CHAR_WORKPARTYINDEX1);
|
||||
if( CHAR_CHECKINDEX( oyaindex)) {
|
||||
nindex = CHAR_getWorkInt( oyaindex, CHAR_WORKPARTYINDEX1+num);
|
||||
}
|
||||
}
|
||||
return nindex;
|
||||
}
|
||||
/*------------------------------------------------------------
|
||||
* 丢永本□斥毛霜耨允月[
|
||||
* 醮棉互中木壬公及醮棉卞手丢永本□斥毛霜耨允月[
|
||||
------------------------------------------------------------*/
|
||||
void CHAR_talkToCliAndParty( int talkedcharaindex,int talkcharaindex,
|
||||
char* message, CHAR_COLOR color )
|
||||
{
|
||||
int i;
|
||||
/* 引内愤坌 */
|
||||
CHAR_talkToCli( talkedcharaindex, talkcharaindex, message, color);
|
||||
|
||||
for( i = 0; i < CHAR_PARTYMAX; i ++ ) {
|
||||
int index = CHAR_getPartyIndex( talkedcharaindex, i);
|
||||
if( CHAR_CHECKINDEX( index) &&
|
||||
index != talkedcharaindex)
|
||||
{
|
||||
CHAR_talkToCli( index, talkcharaindex, message, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2278
char/char_talk.c
Normal file
2278
char/char_talk.c
Normal file
File diff suppressed because it is too large
Load Diff
1902
char/char_walk.c
Normal file
1902
char/char_walk.c
Normal file
File diff suppressed because it is too large
Load Diff
6279
char/chatmagic.c
Normal file
6279
char/chatmagic.c
Normal file
File diff suppressed because it is too large
Load Diff
422
char/chatroom.c
Normal file
422
char/chatroom.c
Normal file
@ -0,0 +1,422 @@
|
||||
#include "version.h"
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include "readmap.h"
|
||||
#include "object.h"
|
||||
#include "char.h"
|
||||
#include "char_base.h"
|
||||
#include "chatmagic.h"
|
||||
#include "battle.h"
|
||||
#include "log.h"
|
||||
#include "configfile.h"
|
||||
#include "lssproto_serv.h"
|
||||
#include "saacproto_cli.h"
|
||||
#include "family.h"
|
||||
#include "chatroom.h"
|
||||
#include "net.h"
|
||||
#include "util.h"
|
||||
|
||||
/*
|
||||
CHAR_WORKCHATROOMTYPE :
|
||||
0 : 无
|
||||
1 : 聊天室室长
|
||||
2 : 聊天室成员
|
||||
*/
|
||||
typedef struct {
|
||||
BOOL useFlag ;
|
||||
int NowPeople;
|
||||
int Maker;
|
||||
int MemberList[MAX_PPLINROOM];
|
||||
char RoomName[32];
|
||||
} CHATROOM_CLASS ;
|
||||
CHATROOM_CLASS ChatRoom[MAX_CHATROOM];
|
||||
|
||||
|
||||
BOOL ChatCheck_BeMaster( int myindex, int chatnum)
|
||||
{
|
||||
if( !CHAR_CHECKINDEX ( myindex ) )
|
||||
return FALSE;
|
||||
|
||||
if( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMNUM ) == 0 ) return FALSE;
|
||||
|
||||
if( chatnum != -1 ){
|
||||
if( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMNUM ) != chatnum )
|
||||
return FALSE;
|
||||
}
|
||||
if( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) == 1 ) return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ChatCheck_Free( int myindex)
|
||||
{
|
||||
int old_gold;
|
||||
if ( !CHAR_CHECKINDEX ( myindex ) )
|
||||
return FALSE;
|
||||
old_gold = CHAR_getInt( myindex, CHAR_GOLD );
|
||||
if( old_gold < 200 ){
|
||||
CHAR_talkToCli ( myindex , -1 , "成立聊天室需花费200石币" , CHAR_COLORYELLOW );
|
||||
return FALSE;
|
||||
}
|
||||
if ( CHAR_getInt ( myindex , CHAR_LV ) < 30 &&
|
||||
CHAR_getInt ( myindex , CHAR_TRANSMIGRATION ) < 1 ) {
|
||||
CHAR_talkToCli ( myindex , -1 , "成立聊天室需0转30级以上!" , CHAR_COLORYELLOW );
|
||||
return FALSE;
|
||||
}
|
||||
if ( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) != 0 ) {
|
||||
CHAR_talkToCli ( myindex , -1 , "你已经在其他聊天室中!" , CHAR_COLORYELLOW );
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void InitChatRoom ( void ) {
|
||||
int i , j ;
|
||||
for ( i = 0 ; i < MAX_CHATROOM ; i ++ ) {
|
||||
ChatRoom[ i ].useFlag = FALSE ;
|
||||
ChatRoom[ i ].Maker = -1 ;
|
||||
ChatRoom[ i ].NowPeople = -1 ;
|
||||
sprintf ( ChatRoom[ i ].RoomName , " " ) ;
|
||||
for ( j = 0 ; j < MAX_PPLINROOM ; j ++ )
|
||||
ChatRoom[ i ].MemberList[ j ] = -1 ;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL ChatRoom_Create ( int myindex , char *message )
|
||||
{
|
||||
int i ;
|
||||
|
||||
if( ChatCheck_Free( myindex) == FALSE ) return FALSE;
|
||||
#ifdef _AVOIDATTACK_IN_ChatRoom_Create_messageToLong
|
||||
if( strlen(message) > 32 )
|
||||
return FALSE;
|
||||
#endif
|
||||
for ( i = 0 ; i < MAX_CHATROOM ; i ++ ) {
|
||||
if ( !ChatRoom[ i ].useFlag ) {
|
||||
ChatRoom[ i ].useFlag = TRUE ;
|
||||
ChatRoom[ i ].Maker = myindex ;
|
||||
ChatRoom[ i ].NowPeople = 1 ;
|
||||
ChatRoom[ i ].MemberList[ 0 ] = myindex ;
|
||||
sprintf ( ChatRoom[ i ].RoomName , "%s" , message ) ;
|
||||
CHAR_setWorkInt ( myindex , CHAR_WORKCHATROOMTYPE , 1 ) ;
|
||||
CHAR_setWorkInt ( myindex , CHAR_WORKCHATROOMNUM , i ) ;
|
||||
ChatRoom_Refresh ( i ) ;
|
||||
|
||||
CHAR_DelGold( myindex, 200);
|
||||
CHAR_talkToCli ( myindex , -1 , "成立聊天室扣除200石币" , CHAR_COLORYELLOW );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
CHAR_talkToCli ( myindex , -1 , "聊天室已满无法建立新的聊天频道!" , CHAR_COLORYELLOW );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ChatRoom_Destroy ( int myindex )
|
||||
{
|
||||
int i , j ;
|
||||
int fd ;/*= getfdFromCharaIndex(myindex);*/
|
||||
char buf[16];
|
||||
if ( !CHAR_CHECKINDEX ( myindex ) )
|
||||
return FALSE;
|
||||
if ( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) == 1 ) {
|
||||
i = CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMNUM ) ;
|
||||
ChatRoom[ i ].useFlag = FALSE ;
|
||||
ChatRoom[ i ].Maker = -1 ;
|
||||
ChatRoom[ i ].NowPeople = -1 ;
|
||||
|
||||
// WON FIX
|
||||
memset( ChatRoom[ i ].RoomName, 0 , sizeof(ChatRoom[ i ].RoomName) );
|
||||
//sprintf ( ChatRoom[ i ].RoomName , " " ) ;
|
||||
|
||||
for ( j = 0 ; j < MAX_PPLINROOM ; j ++ ) {
|
||||
if ( !CHAR_CHECKINDEX ( ChatRoom[ i ].MemberList[ j ] ) ) {
|
||||
ChatRoom[ i ].MemberList[ j ] = -1 ;
|
||||
continue;
|
||||
}
|
||||
CHAR_setWorkInt ( ChatRoom[ i ].MemberList[ j ] , CHAR_WORKCHATROOMTYPE , 0 ) ;
|
||||
CHAR_setWorkInt ( ChatRoom[ i ].MemberList[ j ] , CHAR_WORKCHATROOMNUM , 0 ) ;
|
||||
fd = getfdFromCharaIndex( ChatRoom[ i ].MemberList[ j ] );
|
||||
sprintf ( buf , "D|%d" , i ) ;
|
||||
lssproto_CHATROOM_send ( fd , buf ) ;
|
||||
ChatRoom[ i ].MemberList[ j ] = -1 ;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void ChatRoom_Message ( int myindex , char *message )
|
||||
{
|
||||
int i , j , fd ;
|
||||
char buf[1024];
|
||||
if ( !CHAR_CHECKINDEX ( myindex ) )
|
||||
return ;
|
||||
if ( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) > 0 ) {
|
||||
i = CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMNUM ) ;
|
||||
|
||||
// WON FIX
|
||||
if( i < 0 ) return;
|
||||
|
||||
for ( j = 0 ; j < MAX_PPLINROOM ; j ++ ) {
|
||||
if ( !CHAR_CHECKINDEX ( ChatRoom[ i ].MemberList[ j ] ) )
|
||||
continue;
|
||||
snprintf ( buf , sizeof ( buf ) , "T|%s" , message ) ;
|
||||
fd = getfdFromCharaIndex ( ChatRoom[ i ].MemberList[ j ] );
|
||||
lssproto_CHATROOM_send ( fd , buf ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ChatRoom_Kick ( int myindex , int toindex )
|
||||
{
|
||||
int i , fd ;
|
||||
int Num = CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMNUM );
|
||||
if ( !CHAR_CHECKINDEX ( myindex ) )
|
||||
return ;
|
||||
if ( !CHAR_CHECKINDEX ( toindex ) )
|
||||
return ;
|
||||
if ( myindex == toindex ) return;
|
||||
if ( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) == 1 ) {
|
||||
if ( Num != CHAR_getWorkInt ( toindex , CHAR_WORKCHATROOMNUM ) )
|
||||
return;
|
||||
else {
|
||||
CHAR_setWorkInt ( toindex , CHAR_WORKCHATROOMTYPE , 0 ) ;
|
||||
CHAR_setWorkInt ( toindex , CHAR_WORKCHATROOMNUM , -1) ;
|
||||
//CHAR_talkToCli ( toindex , -1 , "室长将你踢出聊天室!" , CHAR_COLORRED ) ;
|
||||
fd = getfdFromCharaIndex( toindex );
|
||||
lssproto_CHATROOM_send ( fd , "K|" ) ;
|
||||
ChatRoom[ Num ].NowPeople --;
|
||||
for ( i = 0 ; i < MAX_PPLINROOM ; i ++ ) {
|
||||
if ( ChatRoom[ Num ].MemberList[ i ] == toindex ) {
|
||||
ChatRoom[ Num ].MemberList[ i ] = -1 ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ChatRoom_Refresh ( Num ) ;
|
||||
}
|
||||
|
||||
void ChatRoom_Make ( int myindex , int toindex )
|
||||
{
|
||||
int Num = CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMNUM );
|
||||
if ( !CHAR_CHECKINDEX ( myindex ) )
|
||||
return ;
|
||||
if ( !CHAR_CHECKINDEX ( toindex ) )
|
||||
return ;
|
||||
if ( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) == 1 ) {
|
||||
if ( Num != CHAR_getWorkInt ( toindex , CHAR_WORKCHATROOMNUM ) )
|
||||
return;
|
||||
else if ( CHAR_getInt ( toindex , CHAR_LV ) >= 30 ||
|
||||
CHAR_getInt ( toindex , CHAR_TRANSMIGRATION ) >= 1 ) {
|
||||
CHAR_setWorkInt ( myindex , CHAR_WORKCHATROOMTYPE , 2 ) ;
|
||||
CHAR_setWorkInt ( toindex , CHAR_WORKCHATROOMTYPE , 1 ) ;
|
||||
CHAR_talkToCli ( toindex , -1 , "你现在是聊天室的室长!" , CHAR_COLORRED ) ;
|
||||
|
||||
ChatRoom[ Num ].Maker = toindex ;
|
||||
}
|
||||
else {
|
||||
CHAR_talkToCli ( myindex , -1 , "您选择的继任人物等级不足以担任室长!" , CHAR_COLORRED ) ;
|
||||
}
|
||||
}
|
||||
ChatRoom_Refresh ( Num ) ;
|
||||
}
|
||||
|
||||
void ChatRoom_Leave ( int myindex )
|
||||
{
|
||||
int i , NextMaker = -1 ;
|
||||
int Num = CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMNUM );
|
||||
if ( !CHAR_CHECKINDEX ( myindex ) )
|
||||
return ;
|
||||
if ( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) == 1 ) {
|
||||
for ( i = 0 ; i < MAX_PPLINROOM ; i ++ ) {
|
||||
if ( ChatRoom[ Num ].MemberList[ i ] != myindex &&
|
||||
ChatRoom[ Num ].MemberList[ i ] != -1 ) {
|
||||
if ( CHAR_CHECKINDEX ( ChatRoom[ Num ].MemberList[ i ] ) ) {
|
||||
if ( CHAR_getInt ( ChatRoom[ Num ].MemberList[ i ] , CHAR_LV ) >= 30 ||
|
||||
CHAR_getInt ( ChatRoom[ Num ].MemberList[ i ] , CHAR_TRANSMIGRATION ) >= 1 ) {
|
||||
NextMaker = ChatRoom[ Num ].MemberList[ i ] ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( NextMaker != -1 ) {
|
||||
ChatRoom_Make( myindex , NextMaker ) ;
|
||||
CHAR_setWorkInt ( myindex , CHAR_WORKCHATROOMTYPE , 0) ;
|
||||
CHAR_setWorkInt ( myindex , CHAR_WORKCHATROOMNUM, -1) ;
|
||||
ChatRoom[ Num ].NowPeople --;
|
||||
for ( i = 0 ; i < MAX_PPLINROOM ; i ++ ) {
|
||||
if ( ChatRoom[ Num ].MemberList[ i ] == myindex ) {
|
||||
ChatRoom[ Num ].MemberList[ i ] = -1 ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
ChatRoom_Destroy( myindex ) ;
|
||||
return ;
|
||||
}
|
||||
|
||||
}else if ( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) == 2 ) {
|
||||
CHAR_setWorkInt ( myindex, CHAR_WORKCHATROOMTYPE, 0) ;
|
||||
CHAR_setWorkInt ( myindex, CHAR_WORKCHATROOMNUM, -1) ;
|
||||
ChatRoom[ Num ].NowPeople --;
|
||||
for ( i = 0 ; i < MAX_PPLINROOM ; i ++ ) {
|
||||
if ( ChatRoom[ Num ].MemberList[ i ] == myindex ) {
|
||||
ChatRoom[ Num ].MemberList[ i ] = -1 ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
ChatRoom_Refresh ( Num ) ;
|
||||
}
|
||||
|
||||
void ChatRoom_Join ( int myindex , int num )
|
||||
{
|
||||
int fd ;
|
||||
char buf[64];
|
||||
if ( !CHAR_CHECKINDEX ( myindex ) )
|
||||
return ;
|
||||
if ( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) != 0 )
|
||||
return ;
|
||||
if ( ChatRoom[ num ].useFlag == TRUE && ChatRoom[ num ].NowPeople < MAX_PPLINROOM ) {
|
||||
sprintf ( buf , "J|%s|%d" , CHAR_getChar( myindex , CHAR_NAME ) , myindex ) ;
|
||||
fd = getfdFromCharaIndex( ChatRoom[ num ].Maker );
|
||||
lssproto_CHATROOM_send ( fd , buf );
|
||||
}else if ( ChatRoom[ num ].NowPeople >= MAX_PPLINROOM )
|
||||
CHAR_talkToCli ( myindex , -1 , "聊天室人数已满!" , CHAR_COLORRED ) ;
|
||||
|
||||
}
|
||||
|
||||
void ChatRoom_Agree ( int myindex , int toindex , int YesNo ) {
|
||||
int i ;
|
||||
int Num = CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMNUM );
|
||||
if ( !CHAR_CHECKINDEX ( myindex ) )
|
||||
return ;
|
||||
if ( !CHAR_CHECKINDEX ( toindex ) )
|
||||
return ;
|
||||
if ( CHAR_getWorkInt ( toindex , CHAR_WORKCHATROOMTYPE ) != 0 )
|
||||
return;
|
||||
if ( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) == 1 ) {
|
||||
if ( ChatRoom[ Num ].NowPeople < MAX_PPLINROOM && YesNo == 1 ) {
|
||||
CHAR_setWorkInt ( toindex , CHAR_WORKCHATROOMTYPE , 2 ) ;
|
||||
CHAR_setWorkInt ( toindex , CHAR_WORKCHATROOMNUM , Num ) ;
|
||||
ChatRoom[ Num ].NowPeople ++ ;
|
||||
for ( i = 0 ; i < MAX_PPLINROOM ; i ++ ) {
|
||||
if ( ChatRoom[ Num ].MemberList[ i ] == -1 ) {
|
||||
ChatRoom[ Num ].MemberList[ i ] = toindex ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else if ( YesNo == 0 ) {
|
||||
CHAR_talkToCli ( toindex , -1 , "您申请的聊天室室长拒绝您的加入!" , CHAR_COLORRED ) ;
|
||||
}else if ( ChatRoom[ Num ].NowPeople >= MAX_PPLINROOM ) {
|
||||
CHAR_talkToCli ( toindex , -1 , "您申请的聊天室人数已满!" , CHAR_COLORRED ) ;
|
||||
CHAR_talkToCli ( myindex , -1 , "聊天室人数已满!" , CHAR_COLORRED ) ;
|
||||
}
|
||||
}
|
||||
ChatRoom_Refresh ( Num ) ;
|
||||
}
|
||||
|
||||
void ChatRoom_List ( int fd )
|
||||
{
|
||||
int i ;
|
||||
char buf[128];
|
||||
char token[2048] = "B|";
|
||||
for ( i = 0 ; i < MAX_CHATROOM ; i ++ ) {
|
||||
if ( ChatRoom[ i ].useFlag == TRUE ) {
|
||||
sprintf ( buf , "聊天室%2d资讯:室名=>%20s , 室长=>%16s , 人数=>%2d" ,
|
||||
i ,
|
||||
ChatRoom[ i ].RoomName ,
|
||||
CHAR_getChar ( ChatRoom[ i ].Maker , CHAR_NAME ) ,
|
||||
ChatRoom[ i ].NowPeople );
|
||||
|
||||
sprintf ( buf , "r%d|%s|%d|%s|p%d|" ,
|
||||
i ,
|
||||
ChatRoom[ i ].RoomName ,
|
||||
ChatRoom[ i ].Maker ,
|
||||
CHAR_getChar ( ChatRoom[ i ].Maker , CHAR_NAME ) ,
|
||||
ChatRoom[ i ].NowPeople );
|
||||
strncat ( token , buf , sizeof ( buf ) ) ;
|
||||
}
|
||||
}
|
||||
lssproto_CHATROOM_send ( fd , token ) ;
|
||||
}
|
||||
|
||||
void ChatRoom_Refresh ( int Num )
|
||||
{
|
||||
int fd , i , RoomLeader = -1 ;
|
||||
char token[2048] ;
|
||||
char token2[2096] ;
|
||||
char buf[64] ;
|
||||
if ( ChatRoom[ Num ].useFlag == TRUE ) {
|
||||
sprintf ( token , "R|r%d|%s|%d|%s|p%d|" ,
|
||||
Num ,
|
||||
ChatRoom[ Num ].RoomName ,
|
||||
ChatRoom[ Num ].Maker ,
|
||||
CHAR_getChar ( ChatRoom[ Num ].Maker , CHAR_NAME ) ,
|
||||
ChatRoom[ Num ].NowPeople );
|
||||
for ( i = 0 ; i < MAX_PPLINROOM ; i ++ ) {
|
||||
if ( ChatRoom[ Num ].MemberList[ i ] != -1 ) {
|
||||
sprintf( buf , "I%d|%s|%s|" ,
|
||||
ChatRoom[ Num ].MemberList[ i ] ,
|
||||
CHAR_getChar ( ChatRoom[ Num ].MemberList[ i ] , CHAR_NAME ) ,
|
||||
CHAR_getChar ( ChatRoom[ Num ].MemberList[ i ] , CHAR_OWNTITLE )
|
||||
);
|
||||
strncat ( token , buf , sizeof ( buf ) ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
for ( i = 0 ; i < MAX_PPLINROOM ; i ++ ) {
|
||||
if ( ChatRoom[ Num ].MemberList[ i ] != -1 ) {
|
||||
if ( CHAR_getWorkInt ( ChatRoom[ Num ].MemberList[ i ] , CHAR_WORKCHATROOMTYPE ) == 1 ) RoomLeader = 1;
|
||||
else RoomLeader = 0 ;
|
||||
sprintf ( token2 , "%s%d|" , token , RoomLeader ) ;
|
||||
fd= getfdFromCharaIndex ( ChatRoom[ Num ].MemberList[ i ] );
|
||||
lssproto_CHATROOM_send ( fd , token2 ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ChatRoom_recvall ( int fd , char *data )
|
||||
{
|
||||
char Head[4];
|
||||
char message[1024];
|
||||
char buf[16];
|
||||
int myindex ;
|
||||
|
||||
myindex = CONNECT_getCharaindex(fd);
|
||||
if ( !CHAR_CHECKINDEX ( myindex ) )return ;
|
||||
getStringFromIndexWithDelim( data , "|", 1, Head, sizeof(Head));
|
||||
getStringFromIndexWithDelim( data , "|", 2, message, sizeof(message));
|
||||
|
||||
if ( strcmp ( Head , "C" ) == 0 ) { // 成立频道
|
||||
if ( !ChatRoom_Create ( myindex , message ) )
|
||||
print("\nSyu log Create Channel Error" );
|
||||
}else if ( strcmp ( Head , "D" ) == 0 ) { // 删除频道
|
||||
if ( !ChatRoom_Destroy ( myindex ) )
|
||||
print("\nSyu log Destroy Channel Error" ) ;
|
||||
}else if ( strcmp ( Head , "A" ) == 0 ) {// 同意加入频道
|
||||
getStringFromIndexWithDelim( data , "|", 2, message, sizeof(message));
|
||||
getStringFromIndexWithDelim( data , "|", 3, buf, sizeof(buf));
|
||||
ChatRoom_Agree ( myindex , atoi( message ) , atoi( buf ) ) ;
|
||||
}else if ( strcmp ( Head , "J" ) == 0 ) {// 申请频道
|
||||
getStringFromIndexWithDelim( data , "|", 2, message, sizeof(message));
|
||||
ChatRoom_Join ( myindex , atoi( message ) ) ;
|
||||
}else if ( strcmp ( Head , "L" ) == 0 ) {// 离开频道
|
||||
ChatRoom_Leave ( myindex ) ;
|
||||
}else if ( strcmp ( Head , "K" ) == 0 ) {//踢出频道
|
||||
getStringFromIndexWithDelim( data , "|", 2, message, sizeof(message));
|
||||
ChatRoom_Kick ( myindex , atoi( message ) );
|
||||
}else if ( strcmp ( Head , "M" ) == 0 ) { // 更换室长
|
||||
getStringFromIndexWithDelim( data , "|", 2, message, sizeof(message));
|
||||
ChatRoom_Make ( myindex , atoi( message ) );
|
||||
}else if ( strcmp ( Head , "T" ) == 0 ) {// 频道讯息
|
||||
getStringFromIndexWithDelim( data , "|", 2, message, sizeof(message));
|
||||
ChatRoom_Message ( myindex , message ) ;
|
||||
}else if ( strcmp ( Head , "B" ) == 0 ) {// 聊天室清单
|
||||
ChatRoom_List ( fd );
|
||||
}else
|
||||
print("\nSyu log None");
|
||||
}
|
0
char/deathcontend.c
Normal file
0
char/deathcontend.c
Normal file
158
char/defaultGroundEnemy.h
Normal file
158
char/defaultGroundEnemy.h
Normal file
@ -0,0 +1,158 @@
|
||||
#if 0
|
||||
static Char slime=
|
||||
{
|
||||
FALSE, /* use どうでもいい*/
|
||||
|
||||
/* data */
|
||||
{
|
||||
0, /* CHAR_DATAPLACENUMBER */
|
||||
0, /* CHAR_BASEIMAGENUMBER */
|
||||
0, /* CHAR_BASEBASEIMAGENUMBER */
|
||||
0, /* CHAR_FACEIMAGENUMBER */
|
||||
0, /* CHAR_FLOOR */
|
||||
0, /* CHAR_X */
|
||||
0, /* CHAR_Y */
|
||||
0, /* CHAR_DIR 12時を0に時計周りに */
|
||||
0, /* CHAR_LV */
|
||||
0, /* CHAR_GOLD */
|
||||
1, /* CHAR_HP */
|
||||
0, /* CHAR_MP */
|
||||
0, /* CHAR_MAXMP */
|
||||
|
||||
0, /* CHAR_VITAL */
|
||||
0, /* CHAR_STR */
|
||||
0, /* CHAR_TOUGH */
|
||||
0, /* CHAR_DEX */
|
||||
|
||||
0, /* CHAR_CHARM */
|
||||
0, /* CHAR_LUCK */
|
||||
|
||||
0, /* 地属性 */
|
||||
0, /* 水属性 */
|
||||
0, /* 火属性 */
|
||||
0, /* 風属性 */
|
||||
|
||||
0, /* CHAR_SLOT */
|
||||
0, /* CHAR_CRITIAL */
|
||||
0, /* CHAR_COUNTER */
|
||||
0, /* CHAR_RARE */
|
||||
0, /* CHAR_RADARSTRLENGTH */
|
||||
0, /* CHAR_CHATVOLUME */
|
||||
MAKE2VALUE(100,20), /* CHAR_MERCHANTLEVEL */
|
||||
0, /* CHAR_HEALERLEVEL */
|
||||
0, /* CHAR_DETERMINEITEM */
|
||||
|
||||
-1, /* CHAR_INDEXOFEQTITLE */
|
||||
|
||||
0, /* CHAR_POISON */
|
||||
0, /* CHAR_PARALYSIS */
|
||||
0, /* CHAR_SILENCE */
|
||||
0, /* CHAR_STONE */
|
||||
0, /* CHAR_DARKNESS */
|
||||
0, /* CHAR_CONFUSION */
|
||||
|
||||
0, /* CHAR_LOGINCOUNT */
|
||||
0, /* CHAR_DEADCOUNT */
|
||||
0, /* CHAR_WALKCOUNT */
|
||||
0, /* CHAR_TALKCOUNT */
|
||||
0, /* CHAR_DAMAGECOUNT */
|
||||
0, /* CHAR_GETPETCOUNT */
|
||||
0, /* CHAR_KILLPETCOUNT */
|
||||
0, /* CHAR_DEADPETCOUNT */
|
||||
0, /* CHAR_SENDMAILCOUNT */
|
||||
0, /* CHAR_MERGEITEMCOUNT */
|
||||
0, /* CHAR_DUELBATTLECOUNT */
|
||||
0, /* CHAR_DUELWINCOUNT */
|
||||
0, /* CHAR_DUELLOSECOUNT */
|
||||
0, /* CHAR_DUELSTWINCOUNT */
|
||||
0, /* CHAR_DUELMAXSTWINCOUNT */
|
||||
|
||||
CHAR_TYPEENEMY, /* CHAR_WHICHPLAYER */
|
||||
1000, /* CHAR_WALKINTERVAL */
|
||||
1000, /* CHAR_LOOPINTERVAL */
|
||||
|
||||
0, /* CHAR_LEVELEXP */
|
||||
|
||||
-1, /*CHAR_LASTTALKELDER*/
|
||||
0, /*CHAR_SKILLUPPOINT */
|
||||
0, /* CHAR_LEVELUPPOINT */
|
||||
|
||||
0, /*CHAR_IMAGETYPE */
|
||||
CHAR_COLORYELLOW, /* CHAR_NAMECOLOR */
|
||||
CHAR_COLORYELLOW, /* CHAR_POPUPNAMECOLOR */
|
||||
0, /* CHAR_LASTTIMESETLUCK */
|
||||
0, /* CHAR_DUELPOINT */
|
||||
0, /* CHAR_EVENT */
|
||||
0, /* CHAR_EVENT2 */
|
||||
0, /* CHAR_EVENT3 */
|
||||
#ifdef _NEWEVENT
|
||||
0, /* CHAR_EVENT4 */
|
||||
0, /* CHAR_EVENT5 */
|
||||
0, /* CHAR_EVENT6 */
|
||||
#endif
|
||||
0, /* CHAR_NOWEVENT */
|
||||
0, /* CHAR_NOWEVENT2 */
|
||||
0, /* CHAR_NOWEVENT3 */
|
||||
#ifdef _NEWEVENT
|
||||
0, /* CHAR_NOWEVENT4 */
|
||||
0, /* CHAR_NOWEVENT5 */
|
||||
0, /* CHAR_NOWEVENT6 */
|
||||
#endif
|
||||
0, /* CHAR_TRANSMIGRATION */
|
||||
0, /* CHAR_TRANSEQUATION */
|
||||
|
||||
0, /*CHAR_INITDATA */
|
||||
},
|
||||
{
|
||||
{""}, /* CHAR_NAME */
|
||||
{""}, /* CHAR_OWNTITLE */
|
||||
{""}, /* CHAR_ARGUMENT */
|
||||
{""}, /* CHAR_OWNERCDKEY */
|
||||
{""}, /* CHAR_OWNERCHARANAME */
|
||||
#if 0
|
||||
{""}, /* CHAR_INITFUNC */
|
||||
{""}, /* CHAR_WALKPREFUNC */
|
||||
{""}, /* CHAR_WALKPOSTFUNC */
|
||||
{""}, /* CHAR_PREOVERFUNC */
|
||||
{""}, /* CHAR_PREOVERFUNC */
|
||||
{""}, /* CHAR_WATCHFUNC */
|
||||
{""}, /* CHAR_LOOPFUNC */
|
||||
{""}, /* CHAR_DYINGFUNC */
|
||||
{""}, /* CHAR_TALKEDFUNC */
|
||||
{""}, /* CHAR_PREATTACKEDFUNC */
|
||||
{""}, /* CHAR_POSTATTACKEDFUNC */
|
||||
{""}, /* CHAR_OFFFUNC */
|
||||
{""}, /* CHAR_LOOKEDFUNC */
|
||||
{""}, /* CHAR_ITEMPUTFUNC */
|
||||
{""}, /* CHAR_SPECIALTALKEDFUNC */
|
||||
{""}, /* CHAR_WINDOWTALKEDFUNC */
|
||||
#endif
|
||||
},
|
||||
{
|
||||
/* CHAR_ISATTACK */
|
||||
/* CHAR_ISATTACKED */
|
||||
/* CHAR_ISOVER */
|
||||
/* CHAR_ISOVERED */
|
||||
/* CHAR_HAVEHEIGHT */
|
||||
/* CHAR_ISVISIBLE */
|
||||
/* CHAR_ISTRANSPARENT */
|
||||
/* CHAR_ISFLYING */
|
||||
|
||||
SETFLG(1,1,1,1,1,1,0,0 ),
|
||||
|
||||
/* CHAR_ISDIE */
|
||||
/* CHAR_ISBIG */
|
||||
/* CHAR_ISSHOWDAMAGE */
|
||||
/* CHAR_ISPARTY */
|
||||
/* CHAR_ISWARP */
|
||||
/* CHAR_ISDUEL */
|
||||
/* CHAR_ISPARTYCHAT */
|
||||
/* CHAR_ISTRADECARD */
|
||||
|
||||
SETFLG(0,0,1,0,0,0,0,0 ),
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
346
char/defaultPlayer.h
Normal file
346
char/defaultPlayer.h
Normal file
@ -0,0 +1,346 @@
|
||||
#include "version.h"
|
||||
|
||||
static Char player=
|
||||
{
|
||||
FALSE, /* use 升丹匹手中中*/
|
||||
{
|
||||
0, /* CHAR_DATAPLACENUMBER */
|
||||
0, /* CHAR_BASEIMAGENUMBER */
|
||||
0, /* CHAR_BASEBASEIMAGENUMBER */
|
||||
0, /* CHAR_FACEIMAGENUMBER */
|
||||
0, /* CHAR_FLOOR */
|
||||
0, /* CHAR_X */
|
||||
0, /* CHAR_Y */
|
||||
5, /* CHAR_DIR 12凜毛0卞凜煌璃曰卞 */
|
||||
1, /* CHAR_LV */
|
||||
0, /* CHAR_GOLD */
|
||||
1, /* CHAR_HP */
|
||||
0, /* CHAR_MP */
|
||||
|
||||
0, /* CHAR_MAXMP */
|
||||
|
||||
0, /* CHAR_VITAL */
|
||||
0, /* CHAR_STR */
|
||||
0, /* CHAR_TOUGH */
|
||||
0, /* CHAR_DEX */
|
||||
|
||||
0, /* CHAR_CHARM */
|
||||
0, /* CHAR_LUCK */
|
||||
0, /* 譁簞嶺 */
|
||||
0, /* 踹簞嶺 */
|
||||
0, /* 紹簞嶺 */
|
||||
0, /* 氘簞嶺 */
|
||||
|
||||
0, /* CHAR_SLOT*/
|
||||
0, /* CHAR_CRITIAL */
|
||||
0, /* CHAR_COUNTER */
|
||||
0, /* CHAR_RARE */
|
||||
0, /* CHAR_RADARSTRLENGTH */
|
||||
0, /* CHAR_CHATVOLUME */
|
||||
MAKE2VALUE(100,20), /* CHAR_MERCHANTLEVEL */
|
||||
0, /* CHAR_HEALERLEVEL */
|
||||
0, /* CHAR_DETERMINEITEM */
|
||||
|
||||
-1, /* CHAR_INDEXOFEQTITLE */
|
||||
|
||||
|
||||
0, /* CHAR_POISON */
|
||||
0, /* CHAR_PARALYSIS */
|
||||
0, /* CHAR_SILENCE */
|
||||
0, /* CHAR_STONE */
|
||||
0, /* CHAR_DARKNESS */
|
||||
0, /* CHAR_CONFUSION */
|
||||
|
||||
0, /* CHAR_LOGINCOUNT */
|
||||
0, /* CHAR_DEADCOUNT */
|
||||
0, /* CHAR_WALKCOUNT */
|
||||
0, /* CHAR_TALKCOUNT */
|
||||
|
||||
0, /* CHAR_DAMAGECOUNT */
|
||||
0, /* CHAR_GETPETCOUNT */
|
||||
0, /* CHAR_KILLPETCOUNT */
|
||||
0, /* CHAR_DEADPETCOUNT */
|
||||
0, /* CHAR_SENDMAILCOUNT */
|
||||
0, /* CHAR_MERGEITEMCOUNT */
|
||||
|
||||
0, /* CHAR_DUELBATTLECOUNT */
|
||||
0, /* CHAR_DUELWINCOUNT */
|
||||
0, /* CHAR_DUELLOSECOUNT */
|
||||
0, /* CHAR_DUELSTWINCOUNT */
|
||||
0, /* CHAR_DUELMAXSTWINCOUNT */
|
||||
|
||||
CHAR_TYPEPLAYER, /* CHAR_WHICHTYPE */
|
||||
1000, /* CHAR_WALKINTERVAL */
|
||||
1000, /* CHAR_LOOPINTERVAL */
|
||||
#ifdef _NEWOPEN_MAXEXP
|
||||
0, // CHAR_OLDEXP,
|
||||
#endif
|
||||
0, // CHAR_EXP,
|
||||
-1, /* CHAR_LASTTALKELDER*/
|
||||
0, /* CHAR_SKILLUPPOINT */
|
||||
0, /* CHAR_LEVELUPPOINT */
|
||||
|
||||
0, /* CHAR_IMAGETYPE */
|
||||
CHAR_COLORWHITE, /* CHAR_NAMECOLOR */
|
||||
CHAR_COLORWHITE, /* CHAR_POPUPNAMECOLOR */
|
||||
0, /* CHAR_LASTTIMESETLUCK */
|
||||
100, /* CHAR_DUELPOINT */
|
||||
0, /* CHAR_EVENT */
|
||||
0, /* CHAR_EVENT2 */
|
||||
0, /* CHAR_EVENT3 */
|
||||
#ifdef _NEWEVENT
|
||||
0, /* CHAR_EVENT4 */
|
||||
0, /* CHAR_EVENT5 */
|
||||
0, /* CHAR_EVENT6 */
|
||||
#endif
|
||||
0, /* CHAR_NOWEVENT */
|
||||
0, /* CHAR_NOWEVENT2 */
|
||||
0, /* CHAR_NOWEVENT3 */
|
||||
#ifdef _NEWEVENT
|
||||
0, /* CHAR_NOWEVENT4 */
|
||||
0, /* CHAR_NOWEVENT5 */
|
||||
0, /* CHAR_NOWEVENT6 */
|
||||
#endif
|
||||
0, /* CHAR_TRANSMIGRATION */
|
||||
0, /* CHAR_TRANSEQUATION */
|
||||
|
||||
0, /* CHAR_INITDATA */
|
||||
|
||||
//#ifdef _PETSKILL_BECOMEPIG
|
||||
// -1,
|
||||
//#endif
|
||||
|
||||
0, //CHAR_SILENT, /* char shutup time */
|
||||
0, // CHAR_FMINDEX, // 家族 index
|
||||
0, // CHAR_FMLEADERFLAG,
|
||||
/* 家族成員種類
|
||||
* FMMEMBER_NONE :沒有加入任何家族
|
||||
* FMMEMBER_APPLY :申請加入家族中
|
||||
* FMMEMBER_LEADER :族長
|
||||
* FMMEMBER_MEMBER :一般成員
|
||||
* FMMEMBER_ELDER :長老
|
||||
* FMMEMBER_INVITE :祭司 // 暫時不用
|
||||
* FMMEMBER_BAILEE :財務長 // 暫時不用
|
||||
* FMMEMBER_VICELEADER :副族長 // 暫時不用
|
||||
*/
|
||||
0, // CHAR_FMSPRITE, // 家族守護精靈
|
||||
|
||||
0, // CHAR_BANKGOLD,
|
||||
0, // CHAR_RIDEPET,
|
||||
0, // CHAR_LEARNRIDE,
|
||||
#ifdef _NEW_RIDEPETS
|
||||
0, // CHAR_LOWRIDEPETS,
|
||||
#endif
|
||||
0, // CHAR_LIMITLEVEL,
|
||||
#ifdef _PET_FUSION
|
||||
0, // CHAR_FUSIONCODE, //物種編碼
|
||||
0, // CHAR_FUSIONINDEX, //孵化寵物編號
|
||||
0, // CHAR_FUSIONRAISE, //餵養次數
|
||||
0, // CHAR_FUSIONBEIT, //寵蛋旗標
|
||||
0, // CHAR_FUSIONTIMELIMIT, //餵養時間
|
||||
#endif
|
||||
#ifdef _PERSONAL_FAME // Arminius 8.30: 家族個人聲望
|
||||
0, // CHAR_FAME,
|
||||
#endif
|
||||
|
||||
#ifdef _NEWSAVE
|
||||
0, // CHAR_SAVEINDEXNUMBER, /* SaveFile .0.char or .1.char */
|
||||
#endif
|
||||
|
||||
#ifdef _ATTACK_MAGIC
|
||||
0, // CHAR_EARTH_EXP, // 玩家的地魔法熟練度
|
||||
0, // CHAR_WATER_EXP, // 玩家的水魔法熟練度
|
||||
0, // CHAR_FIRE_EXP, // 玩家的火魔法熟練度
|
||||
0, // CHAR_WIND_EXP, // 玩家的風魔法熟練度
|
||||
0, // CHAR_EARTH_RESIST, // 玩家的地魔法抗性
|
||||
0, // CHAR_WATER_RESIST, // 玩家的水魔法抗性
|
||||
0, // CHAR_FIRE_RESIST, // 玩家的火魔法抗性
|
||||
0, // CHAR_WIND_RESIST, // 玩家的風魔法抗性
|
||||
0, // CHAR_EARTH_ATTMAGIC_EXP, // 玩家的地魔法熟練度經驗值
|
||||
0, // CHAR_WATER_ATTMAGIC_EXP, // 玩家的水魔法熟練度經驗值
|
||||
0, // CHAR_FIRE_ATTMAGIC_EXP, // 玩家的火魔法熟練度經驗值
|
||||
0, // CHAR_WIND_ATTMAGIC_EXP, // 玩家的風魔法熟練度經驗值
|
||||
0, // CHAR_EARTH_DEFMAGIC_EXP, // 玩家的地魔法抗性經驗值
|
||||
0, // CHAR_WATER_DEFMAGIC_EXP, // 玩家的水魔法抗性經驗值
|
||||
0, // CHAR_FIRE_DEFMAGIC_EXP, // 玩家的火魔法抗性經驗值
|
||||
0, // CHAR_WIND_DEFMAGIC_EXP, // 玩家的風魔法抗性經驗值
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _GAMBLE_BANK
|
||||
0, // CHAR_PERSONAGOLD, //賭場個人銀行
|
||||
#endif
|
||||
#ifdef _DROPSTAKENEW
|
||||
0, // CHAR_GAMBLENUM, //賭場積分
|
||||
#endif
|
||||
#ifdef _ADD_ACTION //npc動作
|
||||
0, // CHAR_ACTIONSTYLE,
|
||||
#endif
|
||||
#ifdef _PET_EVOLUTION
|
||||
0, // CHAR_EVOLUTIONBASEVTL,
|
||||
0, // CHAR_EVOLUTIONBASESTR,
|
||||
0, // CHAR_EVOLUTIONBASETGH,
|
||||
0, // CHAR_EVOLUTIONBASEDEX,
|
||||
#endif
|
||||
|
||||
#ifdef _FM_JOINLIMIT
|
||||
0, // CHAR_FMTIMELIMIT,
|
||||
#endif
|
||||
|
||||
#ifdef _CHAR_PROFESSION // WON ADD 人物職業
|
||||
0, // PROFESSION_CLASS, // 職業別
|
||||
0, // PROFESSION_LEVEL, // 職業等級
|
||||
// 0, // PROFESSION_EXP, // 職業經驗值
|
||||
0, // PROFESSION_SKILL_POINT, // 技能點數
|
||||
0, // ATTACHPILE, // 增加堆疊
|
||||
0, // PROFESSION_FIRE_P, // 火熟練度
|
||||
0, // PROFESSION_ICE_P, // 冰熟練度
|
||||
0, // PROFESSION_THUNDER_P, // 雷熟練度
|
||||
0, // PROFESSION_FIRE_R, // 火抗性
|
||||
0, // PROFESSION_ICE_R, // 冰抗性
|
||||
0, // PROFESSION_THUNDER_R, // 雷抗性
|
||||
#endif
|
||||
#ifdef _ALLDOMAN // (不可開) Syu ADD 排行榜NPC
|
||||
0, // CHAR_HEROFLOOR,
|
||||
#endif
|
||||
#ifdef _PETSKILL_BECOMEPIG
|
||||
-1, // CHAR_BECOMEPIG,
|
||||
100250, //CHAR_BECOMEPIG_BBI
|
||||
#endif
|
||||
0, // CHAR_LASTLEAVETIME, // Robin add 最後離線時間
|
||||
|
||||
#ifdef _NEW_MANOR_LAW
|
||||
0, // CHAR_MOMENTUM,
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_ADDEXP2
|
||||
0, // CHAR_ADDEXPPOWER,
|
||||
0, // CHAR_ADDEXPTIME,
|
||||
#endif
|
||||
|
||||
#ifdef _VIP_BATTLE_EXP
|
||||
0, // CHAR_NVIPEXP,
|
||||
0, // CHAR_NVIPTIME,
|
||||
#endif
|
||||
|
||||
#ifdef _ANGEL_SUMMON
|
||||
0, // CHAR_HEROCNT, // 完成勇者任務的次數
|
||||
#endif
|
||||
|
||||
#ifdef _TEACHER_SYSTEM
|
||||
0, // CHAR_TEACHER_FAME, // 絳呇鍰絳汒咡
|
||||
#endif
|
||||
|
||||
#ifdef _GM_ITEM
|
||||
0, // 俙模GM韜鍔棒杅
|
||||
#endif
|
||||
#ifdef _VIP_SERVER
|
||||
0, // 頗埜萸杅
|
||||
#endif
|
||||
#ifdef _VIP_RIDE
|
||||
0, // 頗埜ぉ窪憐
|
||||
#endif
|
||||
#ifdef _CAMEO_MONEY
|
||||
0,
|
||||
#endif
|
||||
#ifdef _MISSION_TRAIN
|
||||
0,
|
||||
0,
|
||||
#endif
|
||||
#ifdef _PET_EVOLVE
|
||||
0,
|
||||
#endif
|
||||
#ifdef _FLOOR_DIFI_FIELD
|
||||
0,
|
||||
#endif
|
||||
#ifdef _MISSION_TIME
|
||||
0,
|
||||
#endif
|
||||
#ifdef _PLAYER_TITLE
|
||||
0,
|
||||
0,
|
||||
#endif
|
||||
#ifdef _COWRIE
|
||||
0,
|
||||
#endif
|
||||
#ifdef _ONLINE_TIME
|
||||
0,
|
||||
#endif
|
||||
0, //CHAR_LUASAVE_WORKINT_1
|
||||
0, //CHAR_LUASAVE_WORKINT_2
|
||||
0, //CHAR_LUASAVE_WORKINT_3
|
||||
0, //CHAR_LUASAVE_INT_1
|
||||
0, //CHAR_LUASAVE_INT_2
|
||||
0, //CHAR_LUASAVE_INT_3
|
||||
#ifdef _CAX_ESC_REPORT
|
||||
0, //CHAR_REPORT 藩゜キ善
|
||||
#endif
|
||||
#ifdef _CAX_Mercenary
|
||||
0, //CHAR_MERCENARY 荈條趼僇
|
||||
#endif
|
||||
},
|
||||
|
||||
{
|
||||
{""}, /* CHAR_NAME */
|
||||
{""}, /* CHAR_OWNTITLE */
|
||||
{""}, /* CHAR_ARGUMENT */
|
||||
{""}, /* CHAR_OWNERCDKEY */
|
||||
{""}, /* CHAR_OWNERCHARANAME */
|
||||
},
|
||||
{
|
||||
SETFLG(1,1,1,1,1,1,0,0 ),
|
||||
SETFLG(0,0,0,0,0,0,0,1 ),
|
||||
}
|
||||
};
|
||||
|
||||
LevelUpPattern lvplayer00={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer10={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer20={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer30={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
|
||||
LevelUpPattern lvplayer01={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer11={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer21={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer31={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
|
||||
LevelUpPattern lvplayer02={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer12={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer22={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer32={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
|
||||
LevelUpPattern lvplayer03={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer13={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer23={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer33={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
|
||||
LevelUpPattern lvplayer04={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer14={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer24={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer34={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
|
||||
LevelUpPattern lvplayer05={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer15={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer25={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer35={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
|
||||
LevelUpPattern lvplayer06={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer16={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer26={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer36={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
|
||||
LevelUpPattern lvplayer07={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer17={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer27={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer37={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
|
||||
LevelUpPattern lvplayer08={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer18={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer28={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer38={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
|
||||
LevelUpPattern lvplayer09={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer19={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer29={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
LevelUpPattern lvplayer39={ {{100,10},{200,10},{50,8}},9,11,10};
|
||||
|
||||
|
29
char/defend.c
Normal file
29
char/defend.c
Normal file
@ -0,0 +1,29 @@
|
||||
#include "version.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "readmap.h"
|
||||
#include "object.h"
|
||||
#include "char.h"
|
||||
#include "char_base.h"
|
||||
#include "lssproto_serv.h"
|
||||
#include "saacproto_cli.h"
|
||||
#include "npcutil.h"
|
||||
#include "family.h"
|
||||
#include "log.h"
|
||||
#include "handletime.h"
|
||||
#include "buf.h"
|
||||
#include "net.h"
|
||||
#include "char_base.h"
|
||||
#include "battle.h"
|
||||
#include "npc_bus.h"
|
||||
#include "char_talk.h"
|
||||
#include "npc_scheduleman.h"
|
||||
#include "defend.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
580
char/encount.c
Normal file
580
char/encount.c
Normal file
@ -0,0 +1,580 @@
|
||||
#include "version.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#ifdef _REDHAT_V9
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include "util.h"
|
||||
#include "buf.h"
|
||||
#include "char_base.h"
|
||||
#include "char.h"
|
||||
#include "configfile.h"
|
||||
#include "encount.h"
|
||||
#include "enemy.h"
|
||||
|
||||
#ifdef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件
|
||||
#include "encount.h"
|
||||
#endif
|
||||
|
||||
/* 巨件市它件玄楮 及末□旦 */
|
||||
|
||||
#ifndef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件
|
||||
typedef struct tagENCOUNT_Table
|
||||
{
|
||||
int index;
|
||||
int floor;
|
||||
int encountprob_min; /* 巨件市它件玄割 */
|
||||
int encountprob_max; /* 巨件市它件玄割 */
|
||||
int enemymaxnum; /* 升木分仃衬毛综月井 */
|
||||
int zorder;
|
||||
int groupid[ENCOUNT_GROUPMAXNUM]; /* 弘伙□皿No */
|
||||
int createprob[ENCOUNT_GROUPMAXNUM]; /* 公及弘伙□皿及请蜇 */
|
||||
RECT rect;
|
||||
}ENCOUNT_Table;
|
||||
ENCOUNT_Table *ENCOUNT_table;
|
||||
#endif
|
||||
|
||||
int ENCOUNT_encountnum;
|
||||
#define ENCOUNT_ENEMYMAXCREATENUM 10
|
||||
|
||||
static INLINE BOOL ENCOUNT_CHECKENCOUNTTABLEARRAY( int array)
|
||||
{
|
||||
if( array < 0 || array > ENCOUNT_encountnum-1) return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------
|
||||
* 巨件市它件玄涩烂及赓渝祭毛允月[
|
||||
* 娄醒
|
||||
* filename char* 涩烂白央奶伙
|
||||
* 忒曰袄
|
||||
* 岳 TRUE(1)
|
||||
* 撩 FALSE(0)
|
||||
*------------------------------------------------------------*/
|
||||
BOOL ENCOUNT_initEncount( char* filename )
|
||||
{
|
||||
FILE* f;
|
||||
char line[256];
|
||||
int linenum=0;
|
||||
int encount_readlen=0;
|
||||
|
||||
f = fopen(filename,"r");
|
||||
if( f == NULL ){
|
||||
errorprint;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ENCOUNT_encountnum=0;
|
||||
|
||||
/* 引内 躲卅垫互窒垫丐月井升丹井譬屯月 */
|
||||
while( fgets( line, sizeof( line ), f ) ){
|
||||
linenum ++;
|
||||
if( line[0] == '#' )continue; /* comment */
|
||||
if( line[0] == '\n' )continue; /* none */
|
||||
chomp( line );
|
||||
|
||||
ENCOUNT_encountnum++;
|
||||
}
|
||||
|
||||
if( fseek( f, 0, SEEK_SET ) == -1 ){
|
||||
fprint( "寻找错误\n" );
|
||||
fclose(f);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ENCOUNT_table = allocateMemory( sizeof(struct tagENCOUNT_Table)
|
||||
* ENCOUNT_encountnum );
|
||||
if( ENCOUNT_table == NULL ){
|
||||
fprint( "无法分配内存 %d\n" ,
|
||||
sizeof(ENCOUNT_table)*ENCOUNT_encountnum);
|
||||
fclose( f );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* 赓渝祭 */
|
||||
{
|
||||
int i,j;
|
||||
for( i = 0; i < ENCOUNT_encountnum; i ++ ) {
|
||||
ENCOUNT_table[i].index = -1;
|
||||
ENCOUNT_table[i].floor = 0;
|
||||
ENCOUNT_table[i].encountprob_min = 1;
|
||||
ENCOUNT_table[i].encountprob_min = 50;
|
||||
ENCOUNT_table[i].enemymaxnum = 4;
|
||||
ENCOUNT_table[i].rect.x = 0;
|
||||
ENCOUNT_table[i].rect.y = 0;
|
||||
ENCOUNT_table[i].rect.height = 0;
|
||||
ENCOUNT_table[i].rect.width = 0;
|
||||
ENCOUNT_table[i].zorder = 0;
|
||||
for( j = 0; j < ENCOUNT_GROUPMAXNUM; j ++ ) {
|
||||
ENCOUNT_table[i].groupid[j] = -1;
|
||||
ENCOUNT_table[i].createprob[j] = -1;
|
||||
}
|
||||
#ifdef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件
|
||||
ENCOUNT_table[i].event_now = -1;
|
||||
ENCOUNT_table[i].event_end = -1;
|
||||
ENCOUNT_table[i].enemy_group = -1;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/* 引凶 心 允 */
|
||||
linenum = 0;
|
||||
while( fgets( line, sizeof( line ), f ) ){
|
||||
linenum ++;
|
||||
if( line[0] == '#' )continue; /* comment */
|
||||
if( line[0] == '\n' )continue; /* none */
|
||||
chomp( line );
|
||||
|
||||
/* 垫毛帮溥允月 */
|
||||
/* 引内 tab 毛 " " 卞 五晶尹月 */
|
||||
replaceString( line, '\t' , ' ' );
|
||||
/* 燮 及旦矢□旦毛潸月[*/
|
||||
{
|
||||
int i;
|
||||
char buf[256];
|
||||
for( i = 0; i < strlen( line); i ++) {
|
||||
if( line[i] != ' ' ) {
|
||||
break;
|
||||
}
|
||||
strcpy( buf, &line[i]);
|
||||
}
|
||||
if( i != 0 ) {
|
||||
strcpy( line, buf);
|
||||
}
|
||||
}
|
||||
{
|
||||
char token[256];
|
||||
int ret;
|
||||
int x1,x2,y1,y2;
|
||||
int j;
|
||||
|
||||
/* 蘸户及伙□皿卞 匀凶凛及啃及赓渝祭 */
|
||||
ENCOUNT_table[encount_readlen].index = -1;
|
||||
ENCOUNT_table[encount_readlen].floor = 0;
|
||||
ENCOUNT_table[encount_readlen].encountprob_min = 1;
|
||||
ENCOUNT_table[encount_readlen].encountprob_min = 50;
|
||||
ENCOUNT_table[encount_readlen].enemymaxnum = 4;
|
||||
ENCOUNT_table[encount_readlen].rect.x = 0;
|
||||
ENCOUNT_table[encount_readlen].rect.y = 0;
|
||||
ENCOUNT_table[encount_readlen].rect.height = 0;
|
||||
ENCOUNT_table[encount_readlen].rect.width = 0;
|
||||
ENCOUNT_table[encount_readlen].zorder = 0;
|
||||
for( j = 0; j < ENCOUNT_GROUPMAXNUM; j ++ ) {
|
||||
ENCOUNT_table[encount_readlen].groupid[j] = -1;
|
||||
ENCOUNT_table[encount_readlen].createprob[j] = -1;
|
||||
}
|
||||
#ifdef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件
|
||||
ENCOUNT_table[encount_readlen].event_now = -1;
|
||||
ENCOUNT_table[encount_readlen].event_end = -1;
|
||||
ENCOUNT_table[encount_readlen].enemy_group = -1;
|
||||
#endif
|
||||
|
||||
|
||||
/* 夫午勾户及玄□弁件毛苇月 */
|
||||
ret = getStringFromIndexWithDelim( line,",",1,token,
|
||||
sizeof(token));
|
||||
if( ret==FALSE ){
|
||||
fprint("文件语法错误:%s 第%d行\n",filename,linenum);
|
||||
continue;
|
||||
}
|
||||
ENCOUNT_table[encount_readlen].index = atoi(token);
|
||||
|
||||
/* 2勾户及玄□弁件毛苇月 */
|
||||
ret = getStringFromIndexWithDelim( line,",",2,token,
|
||||
sizeof(token));
|
||||
if( ret==FALSE ){
|
||||
fprint("文件语法错误:%s 第%d行\n",filename,linenum);
|
||||
continue;
|
||||
}
|
||||
ENCOUNT_table[encount_readlen].floor = atoi(token);
|
||||
|
||||
/* 3勾户及玄□弁件毛苇月 */
|
||||
ret = getStringFromIndexWithDelim( line,",",3,token,
|
||||
sizeof(token));
|
||||
if( ret==FALSE ){
|
||||
fprint("文件语法错误:%s 第%d行\n",filename,linenum);
|
||||
continue;
|
||||
}
|
||||
x1 = atoi(token);
|
||||
|
||||
/* 4勾户及玄□弁件毛苇月 */
|
||||
ret = getStringFromIndexWithDelim( line,",",4,token,
|
||||
sizeof(token));
|
||||
if( ret==FALSE ){
|
||||
fprint("文件语法错误:%s 第%d行\n",filename,linenum);
|
||||
continue;
|
||||
}
|
||||
y1= atoi(token);
|
||||
|
||||
/* 5勾户及玄□弁件毛苇月 */
|
||||
ret = getStringFromIndexWithDelim( line,",",5,token,
|
||||
sizeof(token));
|
||||
if( ret==FALSE ){
|
||||
fprint("文件语法错误:%s 第%d行\n",filename,linenum);
|
||||
continue;
|
||||
}
|
||||
|
||||
x2 = atoi(token);
|
||||
|
||||
/* 6勾户及玄□弁件毛苇月 */
|
||||
ret = getStringFromIndexWithDelim( line,",",6,token,
|
||||
sizeof(token));
|
||||
if( ret==FALSE ){
|
||||
fprint("文件语法错误:%s 第%d行\n",filename,linenum);
|
||||
continue;
|
||||
}
|
||||
y2= atoi(token);
|
||||
|
||||
ENCOUNT_table[encount_readlen].rect.x = min(x1,x2);
|
||||
ENCOUNT_table[encount_readlen].rect.width = max(x1,x2) - min(x1,x2);
|
||||
ENCOUNT_table[encount_readlen].rect.y = min(y1,y2);
|
||||
ENCOUNT_table[encount_readlen].rect.height = max(y1,y2) - min(y1,y2);
|
||||
|
||||
/* 7户及玄□弁件毛苇月 */
|
||||
ret = getStringFromIndexWithDelim( line,",",7,token,
|
||||
sizeof(token));
|
||||
if( ret==FALSE ){
|
||||
fprint("文件语法错误:%s 第%d行\n",filename,linenum);
|
||||
continue;
|
||||
}
|
||||
ENCOUNT_table[encount_readlen].encountprob_min = atoi(token);
|
||||
|
||||
/* 8户及玄□弁件毛苇月 */
|
||||
ret = getStringFromIndexWithDelim( line,",",8,token,
|
||||
sizeof(token));
|
||||
if( ret==FALSE ){
|
||||
fprint("文件语法错误:%s 第%d行\n",filename,linenum);
|
||||
continue;
|
||||
}
|
||||
ENCOUNT_table[encount_readlen].encountprob_max = atoi(token);
|
||||
|
||||
{
|
||||
int a,b;
|
||||
a = ENCOUNT_table[encount_readlen].encountprob_min;
|
||||
b = ENCOUNT_table[encount_readlen].encountprob_max;
|
||||
/* 凝及譬帮 */
|
||||
ENCOUNT_table[encount_readlen].encountprob_min
|
||||
= min( a,b);
|
||||
ENCOUNT_table[encount_readlen].encountprob_max
|
||||
= max( a,b);
|
||||
}
|
||||
/* 9勾户及玄□弁件毛苇月 */
|
||||
ret = getStringFromIndexWithDelim( line,",",9,token,
|
||||
sizeof(token));
|
||||
if( ret==FALSE ){
|
||||
fprint("文件语法错误:%s 第%d行\n",filename,linenum);
|
||||
continue;
|
||||
}
|
||||
{
|
||||
int maxnum = atoi( token);
|
||||
/* 醒及恳癫岭及民尼永弁 */
|
||||
if( maxnum < 1 || maxnum > ENCOUNT_ENEMYMAXCREATENUM ) {
|
||||
fprint("文件语法错误:%s 第%d行\n",filename,linenum);
|
||||
continue;
|
||||
}
|
||||
ENCOUNT_table[encount_readlen].enemymaxnum = maxnum;
|
||||
}
|
||||
/* 10户及玄□弁件毛苇月 */
|
||||
ret = getStringFromIndexWithDelim( line,",",10,token,
|
||||
sizeof(token));
|
||||
if( ret==FALSE ){
|
||||
fprint("文件语法错误:%s 第%d行\n",filename,linenum);
|
||||
continue;
|
||||
}
|
||||
ENCOUNT_table[encount_readlen].zorder = atoi(token);
|
||||
#define CREATEPROB_TOKEN 11
|
||||
|
||||
/* 11 31户及玄□弁件毛苇月 */
|
||||
{
|
||||
int i;
|
||||
|
||||
for( i = CREATEPROB_TOKEN; i < CREATEPROB_TOKEN +ENCOUNT_GROUPMAXNUM*2; i ++) {
|
||||
ret = getStringFromIndexWithDelim( line,",",i,token,
|
||||
sizeof(token));
|
||||
if( ret==FALSE ){
|
||||
fprint("文件语法错误:%s 第%d行\n",filename,linenum);
|
||||
continue;
|
||||
}
|
||||
if( strlen( token) != 0 ) {
|
||||
if( i < CREATEPROB_TOKEN + ENCOUNT_GROUPMAXNUM ) {
|
||||
ENCOUNT_table[encount_readlen].groupid[i-CREATEPROB_TOKEN]
|
||||
= atoi(token);
|
||||
}
|
||||
else {
|
||||
ENCOUNT_table[encount_readlen].createprob[i-(CREATEPROB_TOKEN + ENCOUNT_GROUPMAXNUM)]
|
||||
= atoi(token);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 褐 民尼永弁 */
|
||||
if( checkRedundancy( ENCOUNT_table[encount_readlen].groupid,
|
||||
arraysizeof( ENCOUNT_table[encount_readlen].groupid)))
|
||||
{
|
||||
fprint( "文件语法错误:%s 第%d行\n",
|
||||
filename,linenum);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件
|
||||
ret = getStringFromIndexWithDelim( line,",",31,token,
|
||||
sizeof(token));
|
||||
if( ret==FALSE ){
|
||||
fprint("文件语法错误:%s 第%d行\n",filename,linenum);
|
||||
continue;
|
||||
}
|
||||
ENCOUNT_table[encount_readlen].event_now = atoi(token);
|
||||
|
||||
ret = getStringFromIndexWithDelim( line,",",32,token,
|
||||
sizeof(token));
|
||||
if( ret==FALSE ){
|
||||
fprint("文件语法错误:%s 第%d行\n",filename,linenum);
|
||||
continue;
|
||||
}
|
||||
ENCOUNT_table[encount_readlen].event_end = atoi(token);
|
||||
|
||||
ret = getStringFromIndexWithDelim( line,",",33,token,
|
||||
sizeof(token));
|
||||
if( ret==FALSE ){
|
||||
fprint("文件语法错误:%s 第%d行\n",filename,linenum);
|
||||
continue;
|
||||
}
|
||||
ENCOUNT_table[encount_readlen].enemy_group = atoi(token);
|
||||
#endif
|
||||
|
||||
encount_readlen ++;
|
||||
}
|
||||
}
|
||||
fclose(f);
|
||||
|
||||
ENCOUNT_encountnum = encount_readlen;
|
||||
|
||||
print( "有效的遇敌坐标数是 %d..", ENCOUNT_encountnum );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/*------------------------------------------------------------------------
|
||||
* 巨件市它件玄涩烂白央奶伙 心 仄
|
||||
*-----------------------------------------------------------------------*/
|
||||
BOOL ENCOUNT_reinitEncount( void )
|
||||
{
|
||||
freeMemory( ENCOUNT_table);
|
||||
return( ENCOUNT_initEncount( getEncountfile()));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------
|
||||
* 隙烂今木凶甄 及ENCOUNT_table及骄侬毛譬屯月[
|
||||
* zorder及醒侬毛苇化穸燮赐匏及嫖中 毛潸 允月[
|
||||
* 娄醒
|
||||
* floor int 白夫失ID
|
||||
* x int x甄
|
||||
* y int y甄
|
||||
* 忒曰袄
|
||||
* 恳橘 骄侬
|
||||
* 潸 撩 -1
|
||||
------------------------------------------------------------*/
|
||||
int ENCOUNT_getEncountAreaArray( int floor, int x, int y)
|
||||
{
|
||||
int i;
|
||||
int index = -1;
|
||||
for( i=0 ; i<ENCOUNT_encountnum ; i++ ) {
|
||||
if( ENCOUNT_table[i].floor == floor ) {
|
||||
if( CoordinateInRect( &ENCOUNT_table[i].rect, x, y) ) {
|
||||
int curZorder = ENCOUNT_getZorderFromArray(i);
|
||||
if( curZorder >0) {
|
||||
if( index != -1 ) {
|
||||
/* 穸燮赐匏毛譬屯月 */
|
||||
/* 五中 穸燮 */
|
||||
if( curZorder > ENCOUNT_getZorderFromArray(index)) {
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
else {
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return index;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------
|
||||
* 隙烂今木凶甄 及巨件市它件玄割 毛譬屯月[
|
||||
* 娄醒
|
||||
* floor int 白夫失ID
|
||||
* x int x甄
|
||||
* y int y甄
|
||||
* 忒曰袄
|
||||
* 恳橘 ㄟ动晓及割
|
||||
* 潸 撩 -1
|
||||
------------------------------------------------------------*/
|
||||
int ENCOUNT_getEncountPercentMin( int charaindex, int floor , int x, int y )
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ENCOUNT_getEncountAreaArray( floor, x, y);
|
||||
if( ret != -1 ) {
|
||||
ret = ENCOUNT_table[ret].encountprob_min;
|
||||
/* 玄目夫旦躲绊毛勾仃月 */
|
||||
if( CHAR_getWorkInt( charaindex, CHAR_WORK_TOHELOS_COUNT) > 0 ) {
|
||||
ret = ceil( ret *
|
||||
((100 + CHAR_getWorkInt( charaindex, CHAR_WORK_TOHELOS_CUTRATE))
|
||||
/ 100.0));
|
||||
}
|
||||
if( ret < 0 ) ret = 0;
|
||||
if( ret > 100 ) ret = 100;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/*------------------------------------------------------------
|
||||
* 隙烂今木凶甄 及巨件市它件玄割 毛譬屯月[
|
||||
* 娄醒
|
||||
* floor int 白夫失ID
|
||||
* x int x甄
|
||||
* y int y甄
|
||||
* 忒曰袄
|
||||
* 恳橘 ㄟ动晓及割
|
||||
* 潸 撩 -1
|
||||
------------------------------------------------------------*/
|
||||
int ENCOUNT_getEncountPercentMax( int charaindex, int floor , int x, int y )
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ENCOUNT_getEncountAreaArray( floor, x, y);
|
||||
if( ret != -1 ) {
|
||||
ret = ENCOUNT_table[ret].encountprob_max;
|
||||
/* 玄目夫旦躲绊毛勾仃月 */
|
||||
if( CHAR_getWorkInt( charaindex, CHAR_WORK_TOHELOS_COUNT) > 0 ) {
|
||||
ret = ceil( ret *
|
||||
((100 + CHAR_getWorkInt( charaindex, CHAR_WORK_TOHELOS_CUTRATE))
|
||||
/ 100.0));
|
||||
}
|
||||
if( ret < 0 ) ret = 0;
|
||||
if( ret > 100 ) ret = 100;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/*------------------------------------------------------------
|
||||
* 隙烂今木凶甄 及衬戏岳MAX醒毛譬屯月[
|
||||
* 娄醒
|
||||
* floor int 白夫失ID
|
||||
* x int x甄
|
||||
* y int y甄
|
||||
* 忒曰袄
|
||||
* 恳橘 ㄟ动晓及割
|
||||
* 潸 撩 -1
|
||||
------------------------------------------------------------*/
|
||||
int ENCOUNT_getCreateEnemyMaxNum( int floor , int x, int y )
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ENCOUNT_getEncountAreaArray( floor, x, y);
|
||||
if( ret != -1 ) {
|
||||
ret = ENCOUNT_table[ret].enemymaxnum;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/*------------------------------------------------------------
|
||||
* 隙烂今木凶甄 及巨件市它件玄白奴□伙玉及index毛譬屯月[
|
||||
* 娄醒
|
||||
* floor int 白夫失ID
|
||||
* x int x甄
|
||||
* y int y甄
|
||||
* 忒曰袄
|
||||
* 恳橘 ㄟ动晓
|
||||
* 潸 撩 -1
|
||||
------------------------------------------------------------*/
|
||||
int ENCOUNT_getEncountIndex( int floor , int x, int y )
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ENCOUNT_getEncountAreaArray( floor, x, y);
|
||||
if( ret != -1 ) {
|
||||
ret = ENCOUNT_table[ret].index;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/*------------------------------------------------------------
|
||||
* 隙烂今木凶甄 及巨件市它件玄白奴□伙玉及index毛譬屯月[
|
||||
* 娄醒
|
||||
* array int ENCOUNTTABLE及骄侬
|
||||
* 忒曰袄
|
||||
* 恳橘 ㄟ动晓
|
||||
* 潸 撩 -1
|
||||
------------------------------------------------------------*/
|
||||
int ENCOUNT_getEncountIndexFromArray( int array )
|
||||
{
|
||||
if( !ENCOUNT_CHECKENCOUNTTABLEARRAY( array)) return -1;
|
||||
return ENCOUNT_table[array].index;
|
||||
}
|
||||
/*------------------------------------------------------------
|
||||
* 隙烂今木凶甄 及巨件市它件玄割 毛譬屯月[
|
||||
* 娄醒
|
||||
* array int ENCOUNTTABLE及骄侬
|
||||
* 忒曰袄
|
||||
* 恳橘 ㄟ动晓
|
||||
* 潸 撩 -1
|
||||
------------------------------------------------------------*/
|
||||
int ENCOUNT_getEncountPercentFromArray( int array )
|
||||
{
|
||||
if( !ENCOUNT_CHECKENCOUNTTABLEARRAY( array)) return -1;
|
||||
return ENCOUNT_table[array].encountprob_min;
|
||||
}
|
||||
/*------------------------------------------------------------
|
||||
* 隙烂今木凶甄 及衬戏岳MAX醒毛譬屯月[
|
||||
* 娄醒
|
||||
* array int ENCOUNTTABLE及骄侬
|
||||
* 忒曰袄
|
||||
* 恳橘 ㄟ动晓
|
||||
* 潸 撩 -1
|
||||
------------------------------------------------------------*/
|
||||
int ENCOUNT_getCreateEnemyMaxNumFromArray( int array )
|
||||
{
|
||||
if( !ENCOUNT_CHECKENCOUNTTABLEARRAY( array)) return -1;
|
||||
return ENCOUNT_table[array].enemymaxnum;
|
||||
}
|
||||
/*------------------------------------------------------------
|
||||
* 隙烂今木凶骄侬及弘伙□皿 寞毛譬屯月[
|
||||
* 娄醒
|
||||
* array int ENCOUNTTABLE及骄侬
|
||||
* 忒曰袄
|
||||
* 恳橘 ㄟ动晓
|
||||
* 潸 撩 -1
|
||||
------------------------------------------------------------*/
|
||||
int ENCOUNT_getGroupIdFromArray( int array, int grouparray )
|
||||
{
|
||||
if( !ENCOUNT_CHECKENCOUNTTABLEARRAY( array)) return -1;
|
||||
return ENCOUNT_table[array].groupid[grouparray];
|
||||
}
|
||||
/*------------------------------------------------------------
|
||||
* 隙烂今木凶骄侬及弘伙□皿及请蜇 毛譬屯月[
|
||||
* 娄醒
|
||||
* array int ENCOUNTTABLE及骄侬
|
||||
* 忒曰袄
|
||||
* 恳橘 ㄟ动晓
|
||||
* 潸 撩 -1
|
||||
------------------------------------------------------------*/
|
||||
int ENCOUNT_getGroupProbFromArray( int array, int grouparray )
|
||||
{
|
||||
if( !ENCOUNT_CHECKENCOUNTTABLEARRAY( array)) return -1;
|
||||
return ENCOUNT_table[array].createprob[grouparray];
|
||||
}
|
||||
/*------------------------------------------------------------
|
||||
* 隙烂今木凶骄侬及穸燮赐匏毛譬屯月[
|
||||
* 娄醒
|
||||
* array int ENCOUNTTABLE及骄侬
|
||||
* 忒曰袄
|
||||
* 恳橘 ㄟ动晓
|
||||
* 潸 撩 -1
|
||||
------------------------------------------------------------*/
|
||||
int ENCOUNT_getZorderFromArray( int array )
|
||||
{
|
||||
if( !ENCOUNT_CHECKENCOUNTTABLEARRAY( array)) return -1;
|
||||
return ENCOUNT_table[array].zorder;
|
||||
}
|
2759
char/enemy.c
Normal file
2759
char/enemy.c
Normal file
File diff suppressed because it is too large
Load Diff
101
char/event.c
Normal file
101
char/event.c
Normal file
@ -0,0 +1,101 @@
|
||||
#include "version.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "object.h"
|
||||
#include "char_base.h"
|
||||
#include "char.h"
|
||||
#include "readmap.h"
|
||||
#include "map_warppoint.h"
|
||||
#include "event.h"
|
||||
#include "npc_warp.h"
|
||||
#include "npc_npcenemy.h"
|
||||
|
||||
|
||||
static int EVENT_onWarpNPC( int charaindex,int echaraindex,int fl,int x, int y );
|
||||
static int EVENY_npcEncount( int charaindex,int echaraindex,int fl,int x, int y );
|
||||
|
||||
|
||||
typedef int (*FUNC)( int charaindex,int echaraindex,int fl,int x, int y );
|
||||
static FUNC functbl[] = {
|
||||
NULL,
|
||||
NULL, /* 裔烂NPC */
|
||||
EVENY_npcEncount, /* 裔烂衬巨件市它件玄 */
|
||||
EVENT_onWarpNPC, /* warp*/
|
||||
NULL, /* 裔烂NPC */
|
||||
NULL, /* 裔烂NPC */
|
||||
EVENT_onWarpNPC, /* warp*/
|
||||
EVENT_onWarpNPC, /* warp*/
|
||||
EVENT_onWarpNPC, /* warp*/
|
||||
};
|
||||
|
||||
INLINE BOOL EVENT_CHECKEVENTINDEX( int event)
|
||||
{
|
||||
if( event < 0 || event >= CHAR_EVENTNUM) return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int EVENT_main( int charaindex,int event, int x, int y)
|
||||
{
|
||||
OBJECT object;
|
||||
BOOL found = FALSE;
|
||||
int rc = FALSE;
|
||||
int fl = CHAR_getInt( charaindex, CHAR_FLOOR);
|
||||
if( !EVENT_CHECKEVENTINDEX( event)) return FALSE;
|
||||
|
||||
for( object = MAP_getTopObj(fl,x,y) ; object ; object = NEXT_OBJECT(object) ){
|
||||
int o = GET_OBJINDEX(object);
|
||||
if( OBJECT_getType(o) == OBJTYPE_CHARA ){
|
||||
int etype;
|
||||
int echaraindex=OBJECT_getIndex(o);
|
||||
if( !CHAR_CHECKINDEX(echaraindex) )continue;
|
||||
if( CHAR_getInt( echaraindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) continue;
|
||||
etype = CHAR_getWorkInt( echaraindex, CHAR_WORKEVENTTYPE);
|
||||
if( etype != CHAR_EVENT_NONE ) {
|
||||
if( etype == event) {
|
||||
if( functbl[event] != NULL ) {
|
||||
rc = functbl[event]( charaindex, echaraindex, fl,x,y);
|
||||
}
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef _MAP_WARPPOINT
|
||||
else if( OBJECT_getType(o) == OBJTYPE_WARPPOINT){
|
||||
if( !MAPPOINT_CHECKINDEX( OBJECT_getIndex( o)) ) continue;
|
||||
if( OBJECT_getchartype( o) != event ) continue;
|
||||
MAPPOINT_MapWarpHandle( charaindex, OBJECT_getIndex( o), fl, x, y );
|
||||
found = TRUE;
|
||||
rc = TRUE;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
if( !found ) {
|
||||
print( "not found eventobject : cind [%d] event [%d] fl[%d] x[%d] y[%d]\n", charaindex, event, fl,x,y);
|
||||
}
|
||||
*/
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int EVENT_onWarpNPC( int charaindex,int echaraindex,int fl,int x, int y )
|
||||
{
|
||||
NPC_WarpWarpCharacter( echaraindex, charaindex);
|
||||
if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE ) == CHAR_PARTY_LEADER ) {
|
||||
int i;
|
||||
for( i = 1; i < CHAR_PARTYMAX; i ++ ) {
|
||||
int index = CHAR_getWorkInt( charaindex, i + CHAR_WORKPARTYINDEX1);
|
||||
if( CHAR_CHECKINDEX(index) ) {
|
||||
NPC_WarpWarpCharacter( echaraindex, index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
static int EVENY_npcEncount( int charaindex,int echaraindex,int fl,int x, int y )
|
||||
{
|
||||
return NPC_NPCEnemy_Encount( echaraindex, charaindex, 0);
|
||||
}
|
||||
|
3444
char/family.c
Normal file
3444
char/family.c
Normal file
File diff suppressed because it is too large
Load Diff
13
char/ls2data.h
Normal file
13
char/ls2data.h
Normal file
@ -0,0 +1,13 @@
|
||||
#ifndef LS2DATA_DAT
|
||||
#define LS2DATA_DAT
|
||||
|
||||
typedef struct {
|
||||
int hash;
|
||||
char *name;
|
||||
int graphicnumber;
|
||||
} CconvertStringNumber;
|
||||
|
||||
CconvertStringNumber *convertStringNumber;
|
||||
int cconvertStringNumber;
|
||||
|
||||
#endif // LS2DATA_DAT ///:~
|
1226
char/makefile
Normal file
1226
char/makefile
Normal file
File diff suppressed because it is too large
Load Diff
1226
char/makefile.bak
Normal file
1226
char/makefile.bak
Normal file
File diff suppressed because it is too large
Load Diff
1157
char/pet.c
Normal file
1157
char/pet.c
Normal file
File diff suppressed because it is too large
Load Diff
907
char/pet_event.c
Normal file
907
char/pet_event.c
Normal file
@ -0,0 +1,907 @@
|
||||
#include "version.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "object.h"
|
||||
#include "char_base.h"
|
||||
#include "char.h"
|
||||
#include "configfile.h"
|
||||
#include "handletime.h"
|
||||
#include "pet_event.h"
|
||||
#include "npcutil.h"
|
||||
#include "log.h"
|
||||
#include "lssproto_serv.h"
|
||||
// Arminius 8.14 pet talk
|
||||
#include <string.h>
|
||||
#include "npc_exchangeman.h"
|
||||
#include "npc_eventaction.h"
|
||||
#ifdef _ALLBLUES_LUA
|
||||
#include "mylua/function.h"
|
||||
#endif
|
||||
#ifdef _PET_TALK
|
||||
//BOOL PetTalk_CheckFree( int meindex, int toindex, char *buf);
|
||||
BOOL PetTalk_CheckFree( int meindex, int talker, char *buf);
|
||||
|
||||
BOOL PetTalk_BSCheck(int meindex,int talker,char* buf);
|
||||
BOOL PetTalk_FreeIfCheck(int meindex,int talker,char* buf,int kosuu,int flg, int temp);
|
||||
BOOL PetTalk_WarpManReduce(int meindex,int talker,char *buf);
|
||||
BOOL PetTalk_BigSmallLastCheck(int point1,int mypoint,int flg);
|
||||
BOOL PetTalk_CheckTrans(int meindex,int talker,int trans,int flg);
|
||||
BOOL PetTalk_LevelCheck(int meindex,int talker,int level,int flg);
|
||||
BOOL PetTalk_CheckMyPet( int meindex, int talker, int petLv, int flg, int petid);
|
||||
BOOL PetTalk_ItemCheck(int meindex,int talker,int itemNo,int flg);
|
||||
BOOL PetTalk_CheckMyType( int meindex, int toindex, int kosuu, int flg, int Type );
|
||||
BOOL PetTalk_CheckPetEvent( int meindex, int toindex, char *buf);
|
||||
void PetTalk_RequestMain(int meindex,int talker,char *buf);
|
||||
BOOL PetTalk_AddItem(int meindex, int talker, char *buf);
|
||||
BOOL PetTalk_DelItem(int meindex,int talker,char *buf);
|
||||
BOOL PetTalk_RunEvent( int meindex, int talker, char *buf);
|
||||
BOOL PetTalk_CheckMyFloor( int meindex, int talker, char *buf, int flg);
|
||||
#ifdef _PET_TALKBBI
|
||||
BOOL PET_CheckPlayerBBI( int meindex, int charindex, int BBI, int flg);
|
||||
#endif
|
||||
#ifdef _PET_TALKPRO
|
||||
#else
|
||||
char *Pet_TalkGetFunStr( char *temp , char *buf, int len)
|
||||
{
|
||||
char filename[56];
|
||||
char pathfile[128];
|
||||
char talkfun[ 10240];
|
||||
char buf1[256],buf2[256],buf3[256];
|
||||
FILE *petarg;
|
||||
char *cStr=NULL;
|
||||
int talkNo=1,mark=1;
|
||||
char line[4096];
|
||||
BOOL find=FALSE;
|
||||
talkfun[0] ='\0';
|
||||
|
||||
while( getStringFromIndexWithDelim( pettalktext,"&",talkNo, buf1, sizeof( buf1) ) != FALSE){
|
||||
talkNo++;
|
||||
if( NPC_Util_GetStrFromStrWithDelim( buf1, "PETTEMPNO", buf2, sizeof( buf2)) == NULL )
|
||||
continue;
|
||||
mark=2;
|
||||
strcpy( filename,"\0");
|
||||
while( getStringFromIndexWithDelim( buf2,",", mark,buf3,sizeof( buf3)) != FALSE ) {
|
||||
mark ++;
|
||||
if( !strcmp( buf3, temp)) {
|
||||
print("\n buf2=%s",buf2);
|
||||
if( getStringFromIndexWithDelim( buf2,",", 1,filename,sizeof( filename)) == FALSE )
|
||||
return NULL;
|
||||
find = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( find == TRUE )
|
||||
break;
|
||||
}
|
||||
if( !strcmp( filename, "\0") )
|
||||
return NULL;
|
||||
|
||||
sprintf( pathfile, "%s/pettalk/%s", getNpcdir(), filename);
|
||||
petarg = fopen( pathfile , "r" );
|
||||
if( petarg != NULL ) {
|
||||
while( fgets( line, sizeof( line), petarg ) ) {
|
||||
if( strlen( talkfun) != 0 ) {
|
||||
if( talkfun[strlen( talkfun) -1] != '|' ) {
|
||||
strcatsafe( talkfun, sizeof( talkfun), "|");
|
||||
}
|
||||
}
|
||||
chompex( line);
|
||||
strcatsafe( talkfun, sizeof( talkfun ), line);
|
||||
}
|
||||
fclose( petarg);
|
||||
}else {
|
||||
return NULL;
|
||||
}
|
||||
talkNo = 1;
|
||||
while( getStringFromIndexWithDelim( talkfun,"}",talkNo, buf, len) != FALSE) {
|
||||
talkNo++;
|
||||
if( NPC_Util_GetStrFromStrWithDelim( buf, "PETTEMPNO", buf2, sizeof( buf2)) == NULL )
|
||||
continue;
|
||||
if( !strcmp( temp, buf2) ) {
|
||||
cStr = buf;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return( cStr);
|
||||
}
|
||||
#endif
|
||||
void PET_Talkfunc( int meindex, int talkerindex, char *msg, int color)
|
||||
{
|
||||
char buf2[1024], buf3[256];
|
||||
|
||||
char TalkType[][16]={"TALKRUN","EVENTRUN","BOTH"};
|
||||
char AllTalk[PETTALK_MAXID][1024];
|
||||
int Type=0,j,i;
|
||||
int talkNo=0;
|
||||
BOOL FREEs=FALSE;
|
||||
int buttontype = 0;
|
||||
int windowtype = 0;
|
||||
#ifdef _PET_TALKPRO
|
||||
int tPage=-1;
|
||||
#else
|
||||
int petid=-1;
|
||||
char tempNo[32], buf1[10240];
|
||||
#endif
|
||||
int fd = getfdFromCharaIndex( talkerindex);
|
||||
#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) )
|
||||
windowtype = WINDOW_MESSAGETYPE_MESSAGE;
|
||||
buttontype = WINDOW_BUTTONTYPE_OK;
|
||||
if( NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) {
|
||||
if( NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE)
|
||||
return;
|
||||
}
|
||||
for( i = 0 ; i < 5 ; i++ ) {
|
||||
strcpy( AllTalk[i], "\0" );
|
||||
}
|
||||
#ifdef _ALLBLUES_LUA_1_5
|
||||
RunCharTalkedEvent( meindex, talkerindex, msg, color, 1);
|
||||
#endif
|
||||
#ifdef _PET_TALKPRO
|
||||
for( i=0;i<PETTALK_MAXID;i++) {
|
||||
if( pettalktext[i].ID >=0 && pettalktext[i].ID == CHAR_getInt(meindex, CHAR_PETID) ) {
|
||||
if( strcmp( pettalktext[i].DATA, "\0") && strlen( pettalktext[i].DATA) > 0 ) {
|
||||
//snprintf( buf1, sizeof(buf1), pettalktext[i].DATA);
|
||||
tPage=i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( i == PETTALK_MAXID )
|
||||
return;
|
||||
#else
|
||||
sprintf(tempNo,"%d", CHAR_getInt(meindex, CHAR_PETID));
|
||||
petid = CHAR_getInt(meindex, CHAR_PETID);
|
||||
if( Pet_TalkGetFunStr( tempNo , buf1 , sizeof( buf1) ) == NULL ) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if( CHAR_getInt( meindex, CHAR_LV ) >= CHAR_getInt( meindex, CHAR_LIMITLEVEL) ) {
|
||||
Type = 1;
|
||||
}
|
||||
//设定为非主人不得与PET互动
|
||||
if( strcmp( CHAR_getChar( meindex, CHAR_OWNERCDKEY), CHAR_getChar( talkerindex, CHAR_CDKEY) ) ||
|
||||
strcmp( CHAR_getChar( meindex, CHAR_OWNERCHARANAME), CHAR_getChar( talkerindex, CHAR_NAME) )){
|
||||
#ifdef _PET_TALKPRO
|
||||
if( NPC_Util_GetStrFromStrWithDelim( pettalktext[tPage].DATA, "NoPlayerMsg", buf3, sizeof( buf3)) != NULL ) {
|
||||
#else
|
||||
if( NPC_Util_GetStrFromStrWithDelim( buf1, "NoPlayerMsg", buf3, sizeof( buf3)) != NULL ) {
|
||||
#endif
|
||||
}else {
|
||||
sprintf(buf3,"陌生人?我不认识你呀!你是坏人!");
|
||||
}
|
||||
CHAR_talkToCli( talkerindex, meindex, buf3, color);
|
||||
return;
|
||||
}
|
||||
j=0;
|
||||
|
||||
#ifdef _PET_TALKPRO
|
||||
while( getStringFromIndexWithDelim( pettalktext[tPage].DATA,"OVER",talkNo, buf2, sizeof( buf2) ) != FALSE){
|
||||
#else
|
||||
while( getStringFromIndexWithDelim( buf1,"OVER",talkNo, buf2, sizeof( buf2) ) != FALSE){
|
||||
#endif
|
||||
talkNo++;
|
||||
if( ( strstr( buf2, TalkType[Type]) == NULL ) && ( strstr( buf2, TalkType[2]) == NULL ) )continue;
|
||||
if( NPC_Util_GetStrFromStrWithDelim( buf2, "FLOOR", buf3, sizeof( buf3)) != NULL ) {//判断房间号
|
||||
if( PetTalk_CheckMyFloor( meindex, talkerindex, buf3, 0) == FALSE )continue;
|
||||
}
|
||||
if( NPC_Util_GetStrFromStrWithDelim( buf2, "PET", buf3, sizeof( buf3)) != NULL ) {//判断宠物FREE条件
|
||||
if( PetTalk_CheckFree( meindex, meindex, buf3) != TRUE ) continue;
|
||||
}
|
||||
if( NPC_Util_GetStrFromStrWithDelim( buf2, "FREE", buf3, sizeof( buf3) ) == NULL)continue;
|
||||
if( NPC_ActionPassCheck( meindex, talkerindex, buf3) == FALSE ) continue;//判断玩家FREE条件
|
||||
// if( ActionNpc_CheckFree( meindex, talkerindex, buf2, 0) == FALSE ) continue;
|
||||
if( PetTalk_CheckPetEvent( meindex, talkerindex, buf2) == FALSE )continue;
|
||||
FREEs = TRUE; //条件成立
|
||||
strcpy( AllTalk[j++], buf2 );
|
||||
if( j > PETTALK_MAXID-1 ) break;
|
||||
}
|
||||
talkNo = 0;
|
||||
if( FREEs == FALSE) { //如果全部条件都不成立
|
||||
j=0;
|
||||
#ifdef _PET_TALKPRO
|
||||
while( getStringFromIndexWithDelim( pettalktext[tPage].DATA,"OVER",talkNo, buf2, sizeof( buf2) ) != FALSE ){
|
||||
#else
|
||||
while( getStringFromIndexWithDelim( buf1,"OVER",talkNo, buf2, sizeof( buf2) ) != FALSE ){
|
||||
#endif
|
||||
talkNo ++;
|
||||
if( strstr( buf2, "OTHER") == NULL ) continue;
|
||||
if( NPC_Util_GetStrFromStrWithDelim( buf2, "TalkMsg", buf3, sizeof( buf3)) == NULL) continue;
|
||||
while( getStringFromIndexWithDelim( buf3,",",j+1, AllTalk[j], sizeof( AllTalk[j]) ) != FALSE ){
|
||||
j++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( j > 0 ) {
|
||||
strcpy( buf2, AllTalk[ RAND( 0, (j-1) ) ] );
|
||||
if( PetTalk_RunEvent( meindex, talkerindex, buf2) == FALSE ) {
|
||||
sprintf( buf3,"....!");
|
||||
CHAR_talkToCli( talkerindex, meindex, buf3, color);
|
||||
return;
|
||||
}
|
||||
if( NPC_Util_GetStrFromStrWithDelim( buf2, "TalkMsg", buf3, sizeof( buf3)) == NULL) {
|
||||
//sprintf( buf3,"主人,我们去逛逛吧!");
|
||||
strcpy( buf3, buf2);
|
||||
}
|
||||
|
||||
lssproto_WN_send( fd, windowtype, buttontype, 0,
|
||||
CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), buf3 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BOOL PetTalk_CheckMyFloor( int meindex, int talker, char *buf, int flg) {
|
||||
char buf1[16];
|
||||
int Myfloor=-1;
|
||||
Myfloor = CHAR_getInt( talker, CHAR_FLOOR);
|
||||
if( strstr( buf, "!") != NULL ) {
|
||||
getStringFromIndexWithDelim( buf,"!", 2, buf1, sizeof( buf1) );
|
||||
if( Myfloor == atoi( buf1) ) {
|
||||
return FALSE;
|
||||
}
|
||||
}else {
|
||||
if( Myfloor != atoi( buf) ) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL PetTalk_RunEvent( int meindex, int talker, char *buf)
|
||||
{
|
||||
char buf1[256];
|
||||
int LimitLevel = -1;
|
||||
|
||||
if( Action_RunDoEventAction( meindex, talker, buf) == FALSE )
|
||||
return FALSE;
|
||||
|
||||
if( NPC_Util_GetStrFromStrWithDelim( buf, "RandItem", buf1, sizeof( buf1)) != NULL ){
|
||||
if( RAND( 0, 10) > 9 ) {
|
||||
PetTalk_AddItem( meindex, talker, buf1);
|
||||
}else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
if( NPC_Util_GetStrFromStrWithDelim( buf, "LimitLevel", buf1, sizeof( buf1)) != NULL ){
|
||||
LimitLevel = atoi( buf1);
|
||||
CHAR_setInt( meindex, CHAR_LIMITLEVEL, LimitLevel);
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
|
||||
BOOL PetTalk_DelItem(int meindex,int talker,char *buf)
|
||||
{
|
||||
|
||||
int i = 1, j = 1,k = 1;
|
||||
char buff3[128];
|
||||
char buf2[32];
|
||||
int itemindex;
|
||||
|
||||
while( getStringFromIndexWithDelim(buf , "," , k, buff3, sizeof(buff3)) !=FALSE ) {
|
||||
k++;
|
||||
if(strstr(buff3,"*")!=NULL){
|
||||
int itemno;
|
||||
int kosuu;
|
||||
int id;
|
||||
int cnt=0;
|
||||
|
||||
getStringFromIndexWithDelim(buff3,"*",1,buf2,sizeof(buf2));
|
||||
itemno = atoi(buf2);
|
||||
getStringFromIndexWithDelim(buff3,"*",2,buf2,sizeof(buf2));
|
||||
kosuu = atoi(buf2);
|
||||
|
||||
for( i =0 ; i < CHAR_MAXITEMHAVE ; i++ ){
|
||||
itemindex=CHAR_getItemIndex( talker , i );
|
||||
if( ITEM_CHECKINDEX(itemindex) ){
|
||||
id=ITEM_getInt(itemindex ,ITEM_ID );
|
||||
if(itemno==id){
|
||||
cnt++;
|
||||
|
||||
LogItem(
|
||||
CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */
|
||||
CHAR_getChar( talker, CHAR_CDKEY ),
|
||||
#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称
|
||||
itemindex,
|
||||
#else
|
||||
ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */
|
||||
#endif
|
||||
"WarpManDelItem(NPC收道具後传至某点)",
|
||||
CHAR_getInt( talker, CHAR_FLOOR),
|
||||
CHAR_getInt( talker, CHAR_X ),
|
||||
CHAR_getInt( talker, CHAR_Y ),
|
||||
ITEM_getChar( itemindex, ITEM_UNIQUECODE),
|
||||
ITEM_getChar( itemindex, ITEM_NAME),
|
||||
ITEM_getInt( itemindex, ITEM_ID)
|
||||
|
||||
);
|
||||
|
||||
CHAR_DelItem( talker, i);
|
||||
if(cnt == kosuu){
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
/*--蓟氏分 寞及失奶 丞毛蓟请---*/
|
||||
for( j = 0 ; j < CHAR_MAXITEMHAVE ; j++){
|
||||
itemindex = CHAR_getItemIndex( talker ,j);
|
||||
|
||||
if( ITEM_CHECKINDEX(itemindex) ){
|
||||
if( atoi( buff3) == ITEM_getInt(itemindex,ITEM_ID)){
|
||||
LogItem(
|
||||
CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */
|
||||
CHAR_getChar( talker, CHAR_CDKEY ),
|
||||
#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称
|
||||
itemindex,
|
||||
#else
|
||||
ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */
|
||||
#endif
|
||||
"WarpManDelItem(NPC收道具後传至某点)",
|
||||
CHAR_getInt( talker,CHAR_FLOOR),
|
||||
CHAR_getInt( talker,CHAR_X ),
|
||||
CHAR_getInt( talker,CHAR_Y ),
|
||||
ITEM_getChar( itemindex, ITEM_UNIQUECODE),
|
||||
ITEM_getChar( itemindex, ITEM_NAME),
|
||||
ITEM_getInt( itemindex, ITEM_ID)
|
||||
);
|
||||
CHAR_DelItem( talker, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL PetTalk_AddItem(int meindex, int talker, char *buf)
|
||||
{
|
||||
int itemID,k=1,itemindex=-1;
|
||||
int spaceNum=5,i;
|
||||
char buff3[256], msgbuf[64], token[256];
|
||||
int ret;
|
||||
|
||||
while( getStringFromIndexWithDelim(buf , "," , k, buff3, sizeof(buff3)) !=FALSE ){
|
||||
k++;
|
||||
for( i = spaceNum ; i < CHAR_MAXITEMHAVE ; i++ ){
|
||||
itemindex=CHAR_getItemIndex( talker , i );
|
||||
if( itemindex == -1 ) {
|
||||
spaceNum = i+1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( i == CHAR_MAXITEMHAVE ) {
|
||||
snprintf( msgbuf,sizeof( msgbuf), "主人,你的物品栏已经满了!!");
|
||||
CHAR_talkToCli( talker, meindex, msgbuf, CHAR_COLORWHITE);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
k=1;
|
||||
while( getStringFromIndexWithDelim(buf , "," , k, buff3, sizeof(buff3)) !=FALSE ){
|
||||
k++;
|
||||
itemID = atoi( buff3);
|
||||
if( itemID )
|
||||
itemindex = ITEM_makeItemAndRegist( itemID);
|
||||
if(itemindex == -1)
|
||||
continue;
|
||||
ret = CHAR_addItemSpecificItemIndex( talker, itemindex);
|
||||
if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) {
|
||||
ITEM_endExistItemsOne( itemindex);
|
||||
print ("\n ret error!!");
|
||||
return FALSE;
|
||||
}
|
||||
sprintf( token,"拿到%s",ITEM_getChar( itemindex, ITEM_NAME));
|
||||
CHAR_talkToCli( talker, -1,token,CHAR_COLORWHITE);
|
||||
|
||||
CHAR_sendItemDataOne( talker, ret);
|
||||
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL PetTalk_CheckPetEvent( int meindex, int toindex, char *buf)
|
||||
{
|
||||
char buf1[256],buf2[256];
|
||||
int k = 0;
|
||||
|
||||
if( NPC_Util_GetStrFromStrWithDelim( buf, "EndSetFlg", buf1,sizeof( buf1) ) != NULL ) {
|
||||
k=1;
|
||||
while( getStringFromIndexWithDelim(buf1 , "," ,k, buf2, sizeof(buf2) ) != FALSE ){
|
||||
k++;
|
||||
NPC_EventSetFlg( toindex, atoi( buf2));
|
||||
}
|
||||
}
|
||||
if( NPC_Util_GetStrFromStrWithDelim( buf, "NowSetFlg", buf1, sizeof( buf1)) != NULL) {
|
||||
k=1 ;
|
||||
while(getStringFromIndexWithDelim(buf1 , "," , k, buf2, sizeof(buf2))!= FALSE ){
|
||||
k++;
|
||||
NPC_NowEventSetFlg( toindex, atoi( buf2));
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void PetTalk_RequestMain(int meindex,int talker,char *buf)
|
||||
{
|
||||
int shiftbit;
|
||||
char buf2[128];
|
||||
if( NPC_Util_GetStrFromStrWithDelim( buf,"EventNo", buf2,sizeof( buf2) ) == NULL ) {
|
||||
print("\n pet_event.c err:NOT FIND [EventNo] !!");
|
||||
return;
|
||||
}
|
||||
shiftbit = atoi( buf2);
|
||||
if( NPC_NowEventCheckFlg( talker, shiftbit) != TRUE ) {
|
||||
NPC_NowEventSetFlg( talker, shiftbit);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL PetTalk_CheckFree( int meindex, int talker, char *buf)
|
||||
{
|
||||
char buff2[256];
|
||||
char buff3[128];
|
||||
int i=1,j=1;
|
||||
int loop=0;
|
||||
while( getStringFromIndexWithDelim(buf,",",i,buff2,sizeof(buff2)) !=FALSE ) {
|
||||
i++;
|
||||
if(strstr(buff2,"&")!=NULL){
|
||||
j=1;
|
||||
loop=0;
|
||||
while( getStringFromIndexWithDelim(buff2,"&",j,buff3,sizeof(buff3)) !=FALSE ) {
|
||||
j++;
|
||||
if(PetTalk_BSCheck(meindex,talker,buff3)==FALSE) {
|
||||
loop=1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(loop==0) {
|
||||
CHAR_setWorkInt( talker, CHAR_WORKWARPCHECK, TRUE );
|
||||
return TRUE;
|
||||
}
|
||||
}else{
|
||||
if( PetTalk_BSCheck( meindex, talker, buff2) == TRUE ){
|
||||
CHAR_setWorkInt( talker, CHAR_WORKWARPCHECK, TRUE );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
CHAR_setWorkInt( talker, CHAR_WORKWARPCHECK, FALSE );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL PetTalk_BSCheck(int meindex,int talker,char* buf)
|
||||
{
|
||||
char buff2[128];
|
||||
int kosuu,temp=-1,flg=0;
|
||||
char buff1[128],buff3[128];
|
||||
if(strstr( buf, "-") != NULL) {
|
||||
//buff3为抓宠物ID
|
||||
getStringFromIndexWithDelim( buf, "-", 2, buff3, sizeof(buff3));
|
||||
temp = atoi( buff3);
|
||||
getStringFromIndexWithDelim( buf, "-", 1, buff1, sizeof(buff1));
|
||||
strcpy( buf, buff1);
|
||||
}
|
||||
if(strstr( buf, "<") != NULL){
|
||||
getStringFromIndexWithDelim( buf, "<", 2, buff2, sizeof(buff2));
|
||||
kosuu = atoi( buff2);
|
||||
getStringFromIndexWithDelim( buf, "<", 1, buff2, sizeof(buff2));
|
||||
|
||||
if(PetTalk_FreeIfCheck( meindex, talker, buff2, kosuu, 1, temp)==TRUE){
|
||||
return TRUE;
|
||||
}
|
||||
}else if(strstr( buf, ">") != NULL){
|
||||
getStringFromIndexWithDelim( buf, ">", 2, buff2, sizeof(buff2));
|
||||
kosuu = atoi(buff2);
|
||||
getStringFromIndexWithDelim( buf, ">" ,1, buff2, sizeof(buff2));
|
||||
|
||||
if(PetTalk_FreeIfCheck( meindex, talker, buff2, kosuu, 2, temp)==TRUE){
|
||||
return TRUE;
|
||||
}
|
||||
}else if(strstr( buf, "!" ) != NULL){
|
||||
getStringFromIndexWithDelim( buf, "!=", 2, buff2, sizeof(buff2));
|
||||
kosuu = atoi( buff2);
|
||||
getStringFromIndexWithDelim( buf, "!=", 1, buff2, sizeof(buff2));
|
||||
if(PetTalk_FreeIfCheck( meindex, talker, buff2, kosuu, 0, temp) == TRUE){
|
||||
return FALSE;
|
||||
}else{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}else if(strstr( buf, "=") != NULL){
|
||||
getStringFromIndexWithDelim( buf, "=", 2, buff2, sizeof(buff2));
|
||||
kosuu = atoi( buff2);
|
||||
getStringFromIndexWithDelim( buf, "=", 1, buff2, sizeof(buff2));
|
||||
|
||||
if( strstr( buf, "PET")) {
|
||||
flg = 3;
|
||||
}
|
||||
if(strstr( buf, "*") != NULL){
|
||||
if( PetTalk_WarpManReduce( meindex, talker, buf)==TRUE){
|
||||
return TRUE;
|
||||
}
|
||||
}else if(PetTalk_FreeIfCheck( meindex, talker, buff2, kosuu, flg, temp)==TRUE){
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL PetTalk_FreeIfCheck(int meindex,int talker,char* buf,int kosuu,int flg, int temp)
|
||||
{
|
||||
int Type = -1;
|
||||
if(strcmp(buf,"LV")==0){
|
||||
if(PetTalk_LevelCheck(meindex,talker,kosuu,flg)==TRUE){
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if( strcmp( buf, "TRANS") == 0 ) {
|
||||
if( PetTalk_CheckTrans( meindex, talker, kosuu, flg) == TRUE )
|
||||
return TRUE;
|
||||
}
|
||||
if( strcmp( buf, "PET") == 0 ) {
|
||||
if( temp > 0 ) {
|
||||
if( PetTalk_CheckMyPet( meindex, talker, kosuu, flg, temp) == TRUE )
|
||||
return TRUE;
|
||||
}else
|
||||
return FALSE;
|
||||
}
|
||||
if(strcmp( buf, "ITEM")==0){
|
||||
if(PetTalk_ItemCheck(meindex,talker,kosuu,flg)==TRUE){
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
if(strcmp( buf, "ENDEV")==0){
|
||||
if(NPC_EventCheckFlg( talker, kosuu)==TRUE){
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
if(strcmp( buf, "NOWEV")==0){
|
||||
if(NPC_NowEventCheckFlg( talker, kosuu)==TRUE){
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
if(strcmp( buf, "HP" ) == 0 ) {
|
||||
Type = 0;
|
||||
if( PetTalk_CheckMyType( meindex, talker, kosuu, flg, Type ) == TRUE ) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
#ifdef _PET_TALKBBI
|
||||
if(strcmp( buf, "BBI" ) == 0 ) {
|
||||
if( PET_CheckPlayerBBI( meindex, talker, kosuu, flg)== TRUE) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
BOOL PetTalk_CheckMyType( int meindex, int toindex, int kosuu, int flg, int Type ) {
|
||||
int MyType=0,MyMaxType=0;
|
||||
switch( Type ) {
|
||||
case 0: //HP
|
||||
MyType = CHAR_getInt( toindex, CHAR_HP);
|
||||
MyMaxType = CHAR_getWorkInt( toindex, CHAR_WORKMAXHP);
|
||||
MyMaxType = (MyMaxType * kosuu )/ 100;
|
||||
if( PetTalk_BigSmallLastCheck( MyMaxType, MyType , flg ) == TRUE ) {
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL PetTalk_WarpManReduce(int meindex,int talker,char *buf)
|
||||
{
|
||||
char buf2[512];
|
||||
char buf3[256];
|
||||
int id=0;
|
||||
int i;
|
||||
int itemindex;
|
||||
int itemno;
|
||||
int kosuu;
|
||||
int cnt=0;
|
||||
|
||||
getStringFromIndexWithDelim(buf,"=",2,buf2,sizeof(buf2));
|
||||
getStringFromIndexWithDelim(buf2,"*",1,buf3,sizeof(buf3));
|
||||
itemno = atoi(buf3);
|
||||
getStringFromIndexWithDelim(buf2,"*",2,buf3,sizeof(buf3));
|
||||
kosuu = atoi(buf3);
|
||||
for( i=0 ; i < CHAR_MAXITEMHAVE;i++ ){
|
||||
itemindex=CHAR_getItemIndex( talker , i );
|
||||
if( ITEM_CHECKINDEX(itemindex) ){
|
||||
id=ITEM_getInt(itemindex ,ITEM_ID );
|
||||
if(itemno==id){
|
||||
cnt++;
|
||||
if(cnt==kosuu){
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL PetTalk_LevelCheck(int meindex,int talker,int level,int flg)
|
||||
{
|
||||
int mylevel;
|
||||
mylevel=CHAR_getInt(talker,CHAR_LV);
|
||||
if(PetTalk_BigSmallLastCheck(level,mylevel,flg)==TRUE) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL PetTalk_CheckTrans(int meindex,int talker,int trans,int flg)
|
||||
{
|
||||
int myTrans;
|
||||
myTrans=CHAR_getInt(talker, CHAR_TRANSMIGRATION);
|
||||
if( PetTalk_BigSmallLastCheck( trans, myTrans, flg ) == TRUE ) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL PetTalk_CheckMyPet( int meindex, int talker, int petLv, int flg, int petid)
|
||||
{
|
||||
int petsel,petindex=-1;
|
||||
|
||||
for(petsel=0 ; petsel < CHAR_MAXPETHAVE ; petsel++) {
|
||||
petindex = CHAR_getCharPet( talker, petsel);
|
||||
if( petindex == -1 )
|
||||
continue;
|
||||
if(CHAR_getInt( petindex, CHAR_PETID) != petid )
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
if( petsel == CHAR_MAXPETHAVE ) {
|
||||
return FALSE;
|
||||
}else { //找到条件宠
|
||||
if( PetTalk_BigSmallLastCheck( petLv, CHAR_getInt( petindex, CHAR_LV), flg ) == TRUE )
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL PetTalk_ItemCheck(int meindex,int talker,int itemNo,int flg)
|
||||
{
|
||||
int i;
|
||||
int itemindex=-1;
|
||||
int id;
|
||||
for( i=0;i<CHAR_MAXITEMHAVE;i++ ){
|
||||
itemindex = CHAR_getItemIndex( talker , i );
|
||||
if( ITEM_CHECKINDEX( itemindex) ) {
|
||||
id=ITEM_getInt(itemindex ,ITEM_ID );
|
||||
if( PetTalk_BigSmallLastCheck(itemNo,id,flg) == TRUE )
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL PetTalk_BigSmallLastCheck(int point1,int mypoint,int flg)
|
||||
{
|
||||
if(flg==0){
|
||||
if(point1==mypoint) {
|
||||
return TRUE;
|
||||
}
|
||||
}else if(flg==1){
|
||||
if(mypoint < point1) {
|
||||
return TRUE;
|
||||
}
|
||||
}else if(flg==2){
|
||||
if(mypoint > point1) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
#else
|
||||
void PET_Talkfunc( int meindex, int talkerindex, char *msg, int color)
|
||||
{
|
||||
print("\n PET_Talkfunc(...) return; ");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
void PET_CleanFreePetAll()
|
||||
{
|
||||
int objindex;
|
||||
int objmaxnum = OBJECT_getNum();
|
||||
|
||||
for( objindex=0; objindex<objmaxnum; objindex++) {
|
||||
if( CHECKOBJECT( objindex ) == FALSE ) continue;
|
||||
PET_CleanPetdeletetime( objindex);
|
||||
}
|
||||
}
|
||||
|
||||
int PET_CleanPetdeletetime( int objmeindex)
|
||||
{
|
||||
int pindex;
|
||||
|
||||
if( OBJECT_getType(objmeindex) != OBJTYPE_CHARA ) return 0;
|
||||
pindex = OBJECT_getIndex( objmeindex);
|
||||
if( CHAR_getInt( pindex, CHAR_WHICHTYPE) != CHAR_TYPEPET) return 0;
|
||||
if( CHAR_getInt( pindex, CHAR_MAILMODE) != CHAR_PETMAIL_NONE) {
|
||||
}else if( CHAR_getWorkInt( pindex, CHAR_WORKPETFOLLOWMODE) == CHAR_PETFOLLOW_NOW ){
|
||||
}else {
|
||||
#ifdef _PET_LOSTPET
|
||||
// CHAR_CharSaveLostPet( pindex, 0);
|
||||
#endif
|
||||
LogPet(
|
||||
"系统",
|
||||
"Watchfunc",
|
||||
CHAR_getChar( pindex, CHAR_NAME),
|
||||
CHAR_getInt( pindex, CHAR_LV),
|
||||
"timeout_lost(系统清除-地上自由宠)",
|
||||
CHAR_getInt( pindex, CHAR_FLOOR),
|
||||
CHAR_getInt( pindex,CHAR_X ),
|
||||
CHAR_getInt( pindex,CHAR_Y ),
|
||||
CHAR_getChar( pindex, CHAR_UNIQUECODE) // shan 2001/12/14
|
||||
);
|
||||
CHAR_CharaDelete(pindex);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void PET_CHECKFreePetIsIt( int petindex)
|
||||
{
|
||||
int petputtime, defmaxtime;
|
||||
defmaxtime = getPetdeletetime();
|
||||
petputtime = CHAR_getInt( petindex, CHAR_PUTPETTIME);
|
||||
|
||||
if( NowTime.tv_sec < ( petputtime + getPetdeletetime() ) ) return;
|
||||
|
||||
#ifdef _PET_LOSTPET
|
||||
// CHAR_CharSaveLostPet( petindex, 0);
|
||||
#endif
|
||||
|
||||
LogPet(
|
||||
"系统",
|
||||
"Watchfunc",
|
||||
CHAR_getChar( petindex, CHAR_NAME),
|
||||
CHAR_getInt( petindex, CHAR_LV),
|
||||
"timeout_lost(系统清除-地上自由宠)",
|
||||
CHAR_getInt( petindex, CHAR_FLOOR),
|
||||
CHAR_getInt( petindex,CHAR_X ),
|
||||
CHAR_getInt( petindex,CHAR_Y ),
|
||||
CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14
|
||||
);
|
||||
|
||||
CHAR_CharaDelete(petindex);
|
||||
}
|
||||
|
||||
#define PETFOLLOW_TIME 60*60
|
||||
void PET_Watchfunc( int objmeindex, int objmoveindex, CHAR_ACTION act, int x, int y, int dir,
|
||||
int* opt, int optlen )
|
||||
{
|
||||
int pindex;
|
||||
int petindex;
|
||||
int petputtime;
|
||||
|
||||
if( OBJECT_getType(objmoveindex) != OBJTYPE_CHARA ) return;
|
||||
pindex = OBJECT_getIndex( objmoveindex);
|
||||
if( CHAR_getInt( pindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) return;
|
||||
petindex = OBJECT_getIndex( objmeindex);
|
||||
petputtime = CHAR_getInt( petindex, CHAR_PUTPETTIME);
|
||||
|
||||
if( CHAR_getInt( petindex, CHAR_MAILMODE) != CHAR_PETMAIL_NONE) {
|
||||
//宠邮不处理
|
||||
}else if( CHAR_getWorkInt( petindex, CHAR_WORKPETFOLLOWMODE) == CHAR_PETFOLLOW_NOW ){
|
||||
if( NowTime.tv_sec >= (petputtime + 60*60) ) {
|
||||
int ownerindex = CHAR_getWorkInt( petindex, CHAR_WORKPLAYERINDEX);
|
||||
if( CHAR_CHECKINDEX( ownerindex) ){
|
||||
if( CHAR_pickupFollowPet( ownerindex, petindex ) ) {
|
||||
return;
|
||||
}
|
||||
CHAR_talkToCli( ownerindex, -1, "溜宠太久,宠物走失了!!", CHAR_COLORYELLOW );
|
||||
}
|
||||
#ifdef _PET_LOSTPET
|
||||
CHAR_CharSaveLostPet( petindex, 1);
|
||||
LogPet(
|
||||
"系统",
|
||||
"Watchfunc",
|
||||
CHAR_getChar( petindex, CHAR_NAME),
|
||||
CHAR_getInt( petindex, CHAR_LV),
|
||||
"timeout_lost(系统扣留-溜宠自由宠)",
|
||||
CHAR_getInt( petindex, CHAR_FLOOR),
|
||||
CHAR_getInt( petindex,CHAR_X ),
|
||||
CHAR_getInt( petindex,CHAR_Y ),
|
||||
CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14
|
||||
);
|
||||
print("系统扣留-溜宠自由宠:%s\n", CHAR_getUseName( petindex));
|
||||
CHAR_CharaDelete( petindex);
|
||||
#else
|
||||
CHAR_setInt( petindex, CHAR_PUTPETTIME, NowTime.tv_sec);
|
||||
CHAR_setWorkInt( petindex, CHAR_WORKPETFOLLOWMODE, CHAR_PETFOLLOW_NONE);
|
||||
LogPet(
|
||||
CHAR_getChar( pindex, CHAR_NAME ),
|
||||
CHAR_getChar( pindex, CHAR_CDKEY ),
|
||||
CHAR_getChar( petindex, CHAR_NAME),
|
||||
CHAR_getInt( petindex, CHAR_LV),
|
||||
"timeout_lost(溜宠太久,宠物走失))",
|
||||
CHAR_getInt( pindex,CHAR_FLOOR),
|
||||
CHAR_getInt( pindex,CHAR_X ),
|
||||
CHAR_getInt( pindex,CHAR_Y ),
|
||||
CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14
|
||||
|
||||
);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
}else{
|
||||
PET_CHECKFreePetIsIt( petindex);
|
||||
}
|
||||
if( CHAR_getInt( petindex, CHAR_MAILMODE) == CHAR_PETMAIL_IDLE3 ||
|
||||
CHAR_getInt( petindex, CHAR_MAILMODE) == CHAR_PETMAIL_IDLE2){
|
||||
if( act == CHAR_ACTATTACK) {
|
||||
if( NPC_Util_isFaceToChara( pindex,petindex,1 ) == TRUE ) {
|
||||
int action[2] = { CHAR_ACTDAMAGE, CHAR_ACTGUARD};
|
||||
CHAR_sendWatchEvent( objmeindex, action[RAND(0,1)], NULL,0,FALSE);
|
||||
CHAR_setWorkInt( petindex, CHAR_WORKACTION, act);
|
||||
}
|
||||
}
|
||||
}else if( CHAR_getInt( petindex, CHAR_MAILMODE) != CHAR_PETMAIL_NONE) {
|
||||
;
|
||||
}else if( CHAR_getWorkInt( petindex, CHAR_WORKFIXAI) >= 100 ) {
|
||||
int workpindex = CHAR_getWorkInt( petindex, CHAR_WORKPLAYERINDEX);
|
||||
if( act == CHAR_ACTWALK && CHAR_CHECKINDEX( workpindex) && workpindex == pindex ){
|
||||
dir = NPC_Util_GetDirCharToChar( petindex, pindex, 0);
|
||||
if( dir != -1 ) {
|
||||
if( CHAR_getInt( petindex, CHAR_DIR) != dir ) {
|
||||
CHAR_setInt( petindex, CHAR_DIR, dir);
|
||||
CHAR_sendWatchEvent( CHAR_getWorkInt( petindex, CHAR_WORKOBJINDEX),
|
||||
CHAR_ACTTURN,NULL,0,TRUE);
|
||||
}
|
||||
}
|
||||
}else if( NPC_Util_isFaceToFace( petindex, pindex, 2 ) == TRUE ) {
|
||||
switch( act) {
|
||||
case CHAR_ACTATTACK:
|
||||
case CHAR_ACTDAMAGE:
|
||||
case CHAR_ACTDOWN:
|
||||
case CHAR_ACTSTAND:
|
||||
case CHAR_ACTACTIONWALK:
|
||||
case CHAR_ACTGUARD:
|
||||
case CHAR_ACTACTIONSTAND:
|
||||
CHAR_sendWatchEvent( objmeindex, act, NULL,0,FALSE);
|
||||
CHAR_setWorkInt( petindex, CHAR_WORKACTION, act);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else {
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef _PET_TALKBBI
|
||||
BOOL PET_CheckPlayerBBI( int meindex, int charindex, int BBI, int flg)
|
||||
{
|
||||
int MyBBI;
|
||||
if( !CHAR_CHECKINDEX( charindex))
|
||||
return FALSE;
|
||||
if( BBI < 0 )
|
||||
return FALSE;
|
||||
MyBBI = CHAR_getInt( charindex, CHAR_BASEIMAGENUMBER);
|
||||
|
||||
if(flg==0){
|
||||
if(BBI==MyBBI)
|
||||
return TRUE;
|
||||
}else if(flg==1){
|
||||
if(BBI < MyBBI)
|
||||
return TRUE;
|
||||
}else if(flg==2){
|
||||
if(BBI > MyBBI)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
1124
char/petmail.c
Normal file
1124
char/petmail.c
Normal file
File diff suppressed because it is too large
Load Diff
644
char/skill.c
Normal file
644
char/skill.c
Normal file
@ -0,0 +1,644 @@
|
||||
#include "version.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "skill.h"
|
||||
#include "util.h"
|
||||
#include "char.h"
|
||||
|
||||
#ifdef _CHAR_PROFESSION // WON ADD 人物职业
|
||||
#include "battle.h"
|
||||
#include "profession_skill.h"
|
||||
#endif
|
||||
|
||||
|
||||
static SKILL_intDataSetting SKILL_setint[SKILL_DATAINTNUM]={
|
||||
{"lv"}, /* SKILL_LEVEL */
|
||||
{"id"}, /* SKILL_ID */
|
||||
};
|
||||
|
||||
static SKILL_charDataSetting SKILL_setchar[SKILL_DATACHARNUM]={
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
static char SKILL_dataString[STRINGBUFSIZ];
|
||||
|
||||
char* SKILL_makeStringFromSkillData( Skill* sk )
|
||||
{
|
||||
int i;
|
||||
int strlength=0;
|
||||
|
||||
for( i = 0 ; i < SKILL_DATAINTNUM ; i ++ ){
|
||||
char linedata[128];
|
||||
snprintf( linedata , sizeof(linedata),
|
||||
"%s=%d" NONCHAR_DELIMITER,
|
||||
SKILL_setint[i].dumpskill, sk->data[i] );
|
||||
|
||||
strcpysafe( &SKILL_dataString[strlength],
|
||||
sizeof( SKILL_dataString ) - strlength,
|
||||
linedata );
|
||||
strlength += strlen( linedata );
|
||||
if( strlength > sizeof( SKILL_dataString ) )goto RETURN;
|
||||
}
|
||||
|
||||
for( i = 0 ; i < SKILL_DATACHARNUM ; i ++ ){
|
||||
char linedata[128];
|
||||
char escapebuffer[128];
|
||||
snprintf( linedata, sizeof(linedata),
|
||||
"%s=%s" NONCHAR_DELIMITER,
|
||||
SKILL_setchar[i].dumpskill,
|
||||
makeEscapeString(sk->string[i].string,escapebuffer,
|
||||
sizeof(escapebuffer)));
|
||||
|
||||
strcpysafe( &SKILL_dataString[strlength],
|
||||
sizeof( SKILL_dataString ) - strlength,
|
||||
linedata );
|
||||
strlength += strlen( linedata );
|
||||
if( strlength > sizeof( SKILL_dataString ) )goto RETURN;
|
||||
}
|
||||
|
||||
RETURN:
|
||||
dchop( SKILL_dataString , NONCHAR_DELIMITER );
|
||||
|
||||
return SKILL_dataString;
|
||||
}
|
||||
|
||||
|
||||
BOOL SKILL_makeSkillFromStringToArg( char* src, Skill* sk )
|
||||
{
|
||||
int readindex=1;
|
||||
while( 1 ){
|
||||
BOOL ret;
|
||||
char linebuf[512];
|
||||
char first[256];
|
||||
char second[256];
|
||||
int i;
|
||||
|
||||
|
||||
ret = getStringFromIndexWithDelim( src ,NONCHAR_DELIMITER ,
|
||||
readindex,
|
||||
linebuf, sizeof( linebuf ) );
|
||||
if( ret == FALSE )
|
||||
break;
|
||||
|
||||
ret = getStringFromIndexWithDelim( linebuf ,"=", 1,
|
||||
first, sizeof( first ) );
|
||||
if( ret == FALSE ) return FALSE;
|
||||
strcpysafe( second , sizeof( second ),
|
||||
linebuf + strlen(first) + strlen("=") );
|
||||
|
||||
for( i = 0 ; i < SKILL_DATAINTNUM ; i ++ ){
|
||||
if( strcmp(first ,SKILL_setint[i].dumpskill) == 0 ){
|
||||
sk->data[i] = atoi( second );
|
||||
goto NEXT;
|
||||
}
|
||||
}
|
||||
|
||||
for( i = 0 ; i < SKILL_DATACHARNUM ; i ++ ){
|
||||
if( strcmp(first ,SKILL_setchar[i].dumpskill) == 0 ){
|
||||
strcpysafe( sk->string[i].string,
|
||||
sizeof(sk->string[i].string),
|
||||
makeStringFromEscaped(second) );
|
||||
goto NEXT;
|
||||
}
|
||||
}
|
||||
|
||||
fprint( "??? : %s[%s]\n" , linebuf, first );
|
||||
|
||||
NEXT:
|
||||
readindex++;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef _CHAR_PROFESSION // WON ADD 人物职业
|
||||
INLINE int SKILL_getRealInt( Skill* skill, int element)
|
||||
{
|
||||
return skill->data[element];
|
||||
}
|
||||
#endif
|
||||
|
||||
INLINE int SKILL_getInt( Skill* skill, int element)
|
||||
{
|
||||
int value = skill->data[element];
|
||||
|
||||
if( element == SKILL_LEVEL ) value /= 100;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
INLINE int SKILL_setInt( Skill* skill, int element, int new)
|
||||
{
|
||||
int buf = SKILL_getInt( skill, element );
|
||||
skill->data[element] = new;
|
||||
return buf;
|
||||
}
|
||||
|
||||
#ifndef _PROFESSION_SKILL // WON ADD 人物职业技能
|
||||
static void SKILL_setitemlimit( int charaindex, Skill* sk );
|
||||
static void SKILL_setmerchant( int charaindex, Skill* sk );
|
||||
static void SKILL_setlevel( int charaindex, Skill* sk );
|
||||
#endif
|
||||
|
||||
static SKILL_table SKILL_tbl[]={
|
||||
|
||||
#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能
|
||||
{ 100, NULL}, // 1
|
||||
{ 100, NULL},
|
||||
{ 100, NULL},
|
||||
{ 100, NULL},
|
||||
{ 100, NULL},
|
||||
{ 100, NULL},
|
||||
{ 100, NULL},
|
||||
{ 100, NULL},
|
||||
{ 100, NULL},
|
||||
{ 100, NULL},
|
||||
{ 100, NULL},
|
||||
{ 100, NULL},
|
||||
{ 100, NULL},
|
||||
{ 100, NULL},
|
||||
{ 100, NULL},
|
||||
{ 100, NULL}, // 16
|
||||
#else
|
||||
{8,SKILL_setlevel}, /* SKILL_FIRE */
|
||||
{4,NULL}, /* SKILL_MAGICIAN */
|
||||
{4,NULL}, /* SKILL_PREIST */
|
||||
{8,SKILL_setitemlimit}, /* SKILL_ALOTOFTHINGS */
|
||||
{8,NULL}, /* SKILL_AVOIDRATEUP */
|
||||
{4,SKILL_setlevel}, /* SKILL_DETERMINEITEM */
|
||||
{5,SKILL_setlevel}, /* SKILL_DETERMINEOTHERS */
|
||||
{8,SKILL_setmerchant}, /* SKILL_MERCHANT */
|
||||
{8,SKILL_setlevel}, /* SKILL_HEALER */
|
||||
{8,SKILL_setlevel}, /* SKILL_LARGEVOICE */
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
#ifndef _PROFESSION_SKILL // WON ADD 人物职业技能
|
||||
static void SKILL_setitemlimit( int charaindex, Skill* sk )
|
||||
{
|
||||
static int itemlimit[9]={
|
||||
7 + 8 + 4*0,
|
||||
7 + 8 + 4*1,
|
||||
7 + 8 + 4*2,
|
||||
7 + 8 + 4*3,
|
||||
7 + 8 + 4*4,
|
||||
7 + 8 + 4*5,
|
||||
7 + 8 + 4*6,
|
||||
7 + 8 + 4*7,
|
||||
7 + 8 + 4*8,
|
||||
};
|
||||
int level;
|
||||
if( !CHAR_CHECKINDEX(charaindex) )return;
|
||||
if( sk->data[SKILL_IDENTITY] != SKILL_ALOTOFTHINGS )return;
|
||||
level = sk->data[SKILL_LEVEL];
|
||||
if( level < 0 )level = 0;
|
||||
if( level>=arraysizeof(itemlimit) ) level=arraysizeof(itemlimit) - 1;
|
||||
}
|
||||
|
||||
|
||||
static void SKILL_setmerchant( int charaindex, Skill* sk )
|
||||
{
|
||||
int level;
|
||||
int merchantlevel=0;
|
||||
|
||||
if( !CHAR_CHECKINDEX(charaindex) )return;
|
||||
if( sk->data[SKILL_IDENTITY] != SKILL_MERCHANT )return;
|
||||
|
||||
level = sk->data[SKILL_LEVEL];
|
||||
if( level < 0 )level = 0;
|
||||
if( level >= SKILL_tbl[sk->data[SKILL_IDENTITY]].maxlevel )
|
||||
level = SKILL_tbl[sk->data[SKILL_IDENTITY]].maxlevel;
|
||||
|
||||
SETHIGHVALUE(merchantlevel,(100 - level*5));
|
||||
SETLOWVALUE(merchantlevel,(20 + level*5));
|
||||
|
||||
CHAR_setInt( charaindex,CHAR_MERCHANTLEVEL,merchantlevel );
|
||||
}
|
||||
|
||||
|
||||
static void SKILL_setlevel( int charaindex, Skill* sk )
|
||||
{
|
||||
static struct skillvalset
|
||||
{
|
||||
SKILL_ID id;
|
||||
CHAR_DATAINT charadataindex;
|
||||
} skvalset[] = {
|
||||
{ SKILL_DETERMINEITEM, CHAR_DETERMINEITEM },
|
||||
{ SKILL_DETERMINEOTHERS, CHAR_RADARSTRENGTH },
|
||||
{ SKILL_HEALER, CHAR_HEALERLEVEL },
|
||||
{ SKILL_LARGEVOICE, CHAR_CHATVOLUME },
|
||||
};
|
||||
int id;
|
||||
int i;
|
||||
int index=-1;
|
||||
int level;
|
||||
|
||||
if( !CHAR_CHECKINDEX(charaindex) )return;
|
||||
id = sk->data[SKILL_IDENTITY];
|
||||
for( i=0 ; i<arraysizeof(skvalset) ; i ++ )
|
||||
if( skvalset[i].id == id )
|
||||
index = i;
|
||||
|
||||
if( index == -1 )return;
|
||||
|
||||
level = sk->data[SKILL_LEVEL];
|
||||
if( level < 0 )level = 0;
|
||||
if( level >= SKILL_tbl[id].maxlevel )
|
||||
level = SKILL_tbl[id].maxlevel;
|
||||
|
||||
CHAR_setInt(charaindex,skvalset[index].charadataindex,level );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define SKILLSTRINGBUFSIZ 256
|
||||
|
||||
static char ITEM_statusStringBuffer[SKILLSTRINGBUFSIZ];
|
||||
|
||||
|
||||
#ifdef _CHAR_PROFESSION // WON ADD 人物职业
|
||||
char* SKILL_makeSkillStatusString( Skill* skill, int charaindex, int skill_num )
|
||||
{
|
||||
int skillindex=SKILL_getInt( skill,SKILL_IDENTITY);
|
||||
int Pskill=PROFESSION_SKILL_getskillArray( skillindex);
|
||||
int skill_level=0, cost_mp=0;
|
||||
|
||||
// 人物技能等级
|
||||
skill_level = SKILL_getInt( skill, SKILL_LEVEL);
|
||||
|
||||
// 耗费MP
|
||||
if( (cost_mp = PROFESSION_MAGIC_COST_MP( charaindex, skill_num )) == -1 )
|
||||
cost_mp = PROFESSION_SKILL_getInt( Pskill, PROFESSION_SKILL_COST_MP);
|
||||
|
||||
snprintf( ITEM_statusStringBuffer, sizeof( ITEM_statusStringBuffer ),
|
||||
"%d|%d|%d|%d|%d|%d|%d|%s|%s",
|
||||
PROFESSION_SKILL_getInt( Pskill, PROFESSION_SKILL_USE_FLAG),
|
||||
SKILL_getInt(skill,SKILL_IDENTITY),
|
||||
PROFESSION_SKILL_getInt( Pskill, PROFESSION_SKILL_TARGET),
|
||||
PROFESSION_SKILL_getInt( Pskill, PROFESSION_SKILL_KIND),
|
||||
PROFESSION_SKILL_getInt( Pskill, PROFESSION_SKILL_ICON),
|
||||
cost_mp,
|
||||
skill_level,
|
||||
PROFESSION_SKILL_getChar( Pskill, PROFESSION_SKILL_NAME),
|
||||
PROFESSION_SKILL_getChar( Pskill, PROFESSION_SKILL_TXT) );
|
||||
|
||||
return ITEM_statusStringBuffer;
|
||||
}
|
||||
#else
|
||||
char* SKILL_makeSkillStatusString( Skill* skill )
|
||||
{
|
||||
snprintf( ITEM_statusStringBuffer,
|
||||
sizeof( ITEM_statusStringBuffer ),
|
||||
"%d|%d",
|
||||
SKILL_getInt(skill,SKILL_IDENTITY),
|
||||
SKILL_getInt(skill,SKILL_LEVEL) );
|
||||
|
||||
|
||||
return ITEM_statusStringBuffer;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
char* SKILL_makeSkillFalseString( void )
|
||||
{
|
||||
snprintf( ITEM_statusStringBuffer,
|
||||
sizeof( ITEM_statusStringBuffer ),
|
||||
"|" );
|
||||
return ITEM_statusStringBuffer;
|
||||
}
|
||||
|
||||
|
||||
BOOL SKILL_CHECKID( int skillid )
|
||||
{
|
||||
if( SKILL_NUM <= skillid && skillid > 0 )return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SKILL_makeSkillData( Skill* sk ,int skid, int lev )
|
||||
{
|
||||
sk->data[SKILL_LEVEL] = lev;
|
||||
sk->data[SKILL_IDENTITY] = skid;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int SKILL_levelup( Skill* sk )
|
||||
{
|
||||
int id = sk->data[SKILL_IDENTITY];
|
||||
if( !SKILL_CHECKID(id) )return -1;
|
||||
sk->data[SKILL_LEVEL] ++;
|
||||
sk->data[SKILL_LEVEL] = min( sk->data[SKILL_LEVEL],
|
||||
SKILL_tbl[id].maxlevel );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int SKILL_getLevelFromSkillID( int charaindex, SKILL_ID id )
|
||||
{
|
||||
int i;
|
||||
if( !CHAR_CHECKINDEX(charaindex) )return -1;
|
||||
for( i=0 ; i<CHAR_SKILLMAXHAVE ; i++ ){
|
||||
CHAR_HaveSkill* sk;
|
||||
sk = CHAR_getCharHaveSkill(charaindex,i);
|
||||
if( sk && sk->use && sk->skill.data[SKILL_IDENTITY] == id )
|
||||
return sk->skill.data[SKILL_LEVEL];
|
||||
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
BOOL SKILL_getUpableSkillID( int charaindex,char* buf, int buflen )
|
||||
{
|
||||
int i;
|
||||
if( !CHAR_CHECKINDEX(charaindex)) return FALSE;
|
||||
if( buflen <= 0 )return FALSE;
|
||||
buf[0] = '\0';
|
||||
for( i=0 ; i<CHAR_SKILLMAXHAVE ; i++ ){
|
||||
CHAR_HaveSkill* chsk;
|
||||
chsk = CHAR_getCharHaveSkill(charaindex,i);
|
||||
if( chsk && chsk->use
|
||||
&& SKILL_CHECKID(chsk->skill.data[SKILL_IDENTITY])
|
||||
&& chsk->skill.data[SKILL_LEVEL]
|
||||
< SKILL_tbl[chsk->skill.data[SKILL_IDENTITY]].maxlevel ){
|
||||
char tmpbuf[512];
|
||||
snprintf( tmpbuf,sizeof(tmpbuf),"%d|",
|
||||
chsk->skill.data[SKILL_IDENTITY] );
|
||||
strcatsafe( buf, buflen,tmpbuf );
|
||||
}
|
||||
}
|
||||
dchop(buf,"|");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void SKILL_skillEffect( int charaindex )
|
||||
{
|
||||
int i;
|
||||
if( !CHAR_CHECKINDEX(charaindex) )return;
|
||||
|
||||
if( CHAR_getInt(charaindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER)
|
||||
return;
|
||||
|
||||
for( i=0 ; i<CHAR_SKILLMAXHAVE ; i ++ ){
|
||||
typedef void (*SKILLEFFECTFUNC)(int,Skill*);
|
||||
SKILLEFFECTFUNC skfunc;
|
||||
CHAR_HaveSkill* cskill;
|
||||
Skill* skill;
|
||||
int id;
|
||||
|
||||
cskill = CHAR_getCharHaveSkill(charaindex,i);
|
||||
if( cskill == NULL || cskill->use == FALSE )continue;
|
||||
|
||||
skill = &cskill->skill;
|
||||
id = skill->data[SKILL_IDENTITY];
|
||||
if( !SKILL_CHECKID(id) )continue;
|
||||
|
||||
skfunc = (SKILLEFFECTFUNC)SKILL_tbl[id].effectfunc;
|
||||
if( skfunc )skfunc(charaindex,skill);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef _CHAR_PROFESSION // WON ADD 人物职业
|
||||
// 取使用魔法耗费MP
|
||||
int PROFESSION_MAGIC_COST_MP( int charaindex, int skill_num )
|
||||
{
|
||||
int skill_level=0, dec_mp=0;
|
||||
int Pskillid, skillid;
|
||||
char *skill_name;
|
||||
CHAR_HaveSkill* hskill;
|
||||
|
||||
// 人物技能
|
||||
skillid = CHAR_getCharSkill( charaindex, skill_num);
|
||||
Pskillid = PROFESSION_SKILL_getskillArray( skillid);
|
||||
if( Pskillid == -1 ) return FALSE;
|
||||
|
||||
// 技能名称
|
||||
skill_name = PROFESSION_SKILL_getChar( Pskillid, PROFESSION_SKILL_FUNCNAME);
|
||||
|
||||
// 技能等级
|
||||
hskill = CHAR_getCharHaveSkill( charaindex, skill_num );
|
||||
skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL);
|
||||
skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level );
|
||||
|
||||
if( (strcmp( skill_name, "PROFESSION_VOLCANO_SPRINGS" )) == 0 ){ // 火山泉
|
||||
if( skill_level >= 10 ) dec_mp = 35;
|
||||
else if( skill_level >= 7 ) dec_mp = 30;
|
||||
else if( skill_level >= 5 ) dec_mp = 20;
|
||||
else if( skill_level >= 3 ) dec_mp = 15;
|
||||
else dec_mp = 10;
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_FIRE_BALL" )) == 0 ){ // 火星球
|
||||
if( skill_level >= 9 ) dec_mp = 50;
|
||||
else if( skill_level >= 7 ) dec_mp = 45;
|
||||
else if( skill_level >= 5 ) dec_mp = 40;
|
||||
else if( skill_level >= 3 ) dec_mp = 35;
|
||||
else dec_mp = 30;
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_SUMMON_THUNDER" )) == 0 ){ // 召雷术
|
||||
if( skill_level >= 8 ) dec_mp = 30;
|
||||
else if( skill_level >= 5 ) dec_mp = 25;
|
||||
else if( skill_level >= 3) dec_mp = 20;
|
||||
else dec_mp = 10;
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_CURRENT" )) == 0 ){ // 电流术
|
||||
#ifdef _PROFESSION_ADDSKILL
|
||||
if( skill_level >= 10 ) dec_mp = 100;
|
||||
else if( skill_level > 9 ) dec_mp = 90;
|
||||
else if( skill_level > 8 ) dec_mp = 80;
|
||||
else if( skill_level > 7 ) dec_mp = 70;
|
||||
else if( skill_level > 6 ) dec_mp = 60;
|
||||
else if( skill_level > 4 ) dec_mp = 50;
|
||||
else if( skill_level > 2 ) dec_mp = 40;
|
||||
else dec_mp = 30;
|
||||
#else
|
||||
if( skill_level >= 9 ) dec_mp = 80;
|
||||
else if( skill_level >= 7 ) dec_mp = 60;
|
||||
else if( skill_level >= 5 ) dec_mp = 50;
|
||||
else if( skill_level >= 3 ) dec_mp = 40;
|
||||
else dec_mp = 30;
|
||||
#endif
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_STORM" )) == 0 ){ // 暴风雨
|
||||
#ifdef _PROFESSION_ADDSKILL
|
||||
if( skill_level > 8 ) dec_mp = 50;
|
||||
else if( skill_level > 6 ) dec_mp = 45;
|
||||
else if( skill_level > 4 ) dec_mp = 40;
|
||||
else if( skill_level > 2 ) dec_mp = 35;
|
||||
else dec_mp = 30;
|
||||
#else
|
||||
if( skill_level >= 10 ) dec_mp = 80;
|
||||
else if( skill_level >= 6 ) dec_mp = 70;
|
||||
else if( skill_level >= 5 ) dec_mp = 60;
|
||||
else dec_mp = 50;
|
||||
#endif
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_ICE_ARROW" )) == 0 ){ // 冰箭术
|
||||
if( skill_level >= 8) dec_mp = 20;
|
||||
else if( skill_level >= 4 ) dec_mp = 15;
|
||||
else dec_mp = 10;
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_ICE_CRACK" )) == 0 ){ // 冰爆术
|
||||
#ifdef _PROFESSION_ADDSKILL
|
||||
if( skill_level >= 10 ) dec_mp = 80;
|
||||
else if( skill_level > 8 ) dec_mp = 70;
|
||||
else if( skill_level > 6 ) dec_mp = 60;
|
||||
else if( skill_level > 4 ) dec_mp = 50;
|
||||
else if( skill_level > 2 ) dec_mp = 40;
|
||||
else dec_mp = 30;
|
||||
#else
|
||||
if( skill_level >= 9 ) dec_mp = 70;
|
||||
else if( skill_level >= 7 ) dec_mp = 60;
|
||||
else if( skill_level >= 5 ) dec_mp = 50;
|
||||
else if( skill_level >= 3 ) dec_mp = 40;
|
||||
else dec_mp = 30;
|
||||
#endif
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_DOOM" )) == 0 ){ // 世界末日
|
||||
if( skill_level > 8 ) dec_mp = 150;
|
||||
else if( skill_level > 4 ) dec_mp = 100;
|
||||
else dec_mp = 50;
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_FIRE_SPEAR" )) == 0 ){ // 火龙枪
|
||||
if( skill_level > 8 ) dec_mp = 80;
|
||||
else if( skill_level > 6 ) dec_mp = 70;
|
||||
else if( skill_level > 4 ) dec_mp = 60;
|
||||
else if( skill_level > 2 ) dec_mp = 40;
|
||||
else dec_mp = 30;
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_BLOOD_WORMS" )) == 0 ){ // 嗜血蛊
|
||||
if( skill_level >= 10 ) dec_mp = 15;
|
||||
else if( skill_level >= 5 ) dec_mp = 10;
|
||||
else dec_mp = 5;
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_SIGN" )) == 0 ){ // 一针见血
|
||||
|
||||
if( skill_level >= 8 ) dec_mp = 10;
|
||||
else dec_mp = 5;
|
||||
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_ENCLOSE" )) == 0 ){ // 附身术
|
||||
if( skill_level >= 10 ) dec_mp = 80;
|
||||
else if( skill_level >= 8 ) dec_mp = 70;
|
||||
else if( skill_level >= 5) dec_mp = 60;
|
||||
else dec_mp = 50;
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_ICE_MIRROR" )) == 0 ){ // 冰镜术
|
||||
if( skill_level >= 9 ) dec_mp = 40;
|
||||
else if( skill_level >= 7 ) dec_mp = 35;
|
||||
else if( skill_level >= 5 ) dec_mp = 30;
|
||||
else if( skill_level >= 3 ) dec_mp = 25;
|
||||
else dec_mp = 20;
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_FIRE_ENCLOSE" )) == 0 ){ // 火附体
|
||||
if( skill_level >= 10 ) dec_mp = 50;
|
||||
else if( skill_level >= 7 ) dec_mp = 40;
|
||||
else if( skill_level >= 4 ) dec_mp = 30;
|
||||
else dec_mp = 20;
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_ICE_ENCLOSE" )) == 0 ){ // 冰附体
|
||||
if( skill_level >= 10 ) dec_mp = 50;
|
||||
else if( skill_level >= 7 ) dec_mp = 40;
|
||||
else if( skill_level >= 4 ) dec_mp = 30;
|
||||
else dec_mp = 20;
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_THUNDER_ENCLOSE" )) == 0 ){ // 雷附体
|
||||
if( skill_level >= 10 ) dec_mp = 50;
|
||||
else if( skill_level >= 7 ) dec_mp = 40;
|
||||
else if( skill_level >= 4 ) dec_mp = 30;
|
||||
else dec_mp = 20;
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_TRANSPOSE" )) == 0 ){ // 移形换位
|
||||
if( skill_level >= 10 ) dec_mp = 50;
|
||||
else if( skill_level >= 9 ) dec_mp = 40;
|
||||
else if( skill_level >= 7 ) dec_mp = 30;
|
||||
else if( skill_level >= 4 ) dec_mp = 20;
|
||||
else dec_mp = 10;
|
||||
}else
|
||||
#ifdef _PROFESSION_ADDSKILL
|
||||
if( (strcmp( skill_name, "PROFESSION_RESIST_F_I_T" )) == 0 ){ // 自然威能
|
||||
if( skill_level >= 10 ) dec_mp = 20;
|
||||
else if( skill_level >= 9 ) dec_mp = 15;
|
||||
else if( skill_level >= 6 ) dec_mp = 10;
|
||||
else dec_mp = 5;
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_CALL_NATURE" )) == 0 ){ // 号召自然
|
||||
|
||||
/*skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL);
|
||||
if( skill_level >= 100 ) dec_mp = 50;
|
||||
else if( skill_level > 95 ) dec_mp = 50;
|
||||
else if( skill_level > 90 ) dec_mp = 50;
|
||||
else if( skill_level > 85 ) dec_mp = 50;
|
||||
else if( skill_level > 80 ) dec_mp = 50;
|
||||
else if( skill_level > 60 ) dec_mp = 50;
|
||||
else if( skill_level > 40 ) dec_mp = 50;
|
||||
else if( skill_level > 20 ) dec_mp = 50;
|
||||
else dec_mp = 50;*/
|
||||
dec_mp = 50;
|
||||
}else
|
||||
if( (strcmp( skill_name, "PROFESSION_BOUNDARY" )) == 0 ){ // 四属性结界
|
||||
char *pszP=NULL;
|
||||
if( skill_level > 9 ) dec_mp = 20;
|
||||
else if( skill_level > 6 ) dec_mp = 15;
|
||||
else dec_mp = 10;
|
||||
//破除结界耗损mp与其他结界不同
|
||||
if( (pszP = strstr( PROFESSION_SKILL_getChar( Pskillid, PROFESSION_SKILL_OPTION), "破结界" ) ) != NULL ){// 技能的参数
|
||||
if( skill_level >= 9 ) dec_mp = 20;
|
||||
else if( skill_level > 4 ) dec_mp = 15;
|
||||
else if( skill_level > 2 ) dec_mp = 10;
|
||||
else dec_mp = 5;
|
||||
}
|
||||
}else
|
||||
#endif
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
return dec_mp;
|
||||
}
|
||||
|
||||
|
||||
INLINE int PROFESSION_CHANGE_SKILL_LEVEL_M( int skill_level )
|
||||
{
|
||||
if( skill_level > 90 )skill_level = 10;
|
||||
else if( skill_level > 80 ) skill_level = 9;
|
||||
else if( skill_level > 70 ) skill_level = 8;
|
||||
else if( skill_level > 60 ) skill_level = 7;
|
||||
else if( skill_level > 50 ) skill_level = 6;
|
||||
else if( skill_level > 40 ) skill_level = 5;
|
||||
else if( skill_level > 30 ) skill_level = 4;
|
||||
else if( skill_level > 20 ) skill_level = 3;
|
||||
else if( skill_level > 10 ) skill_level = 2;
|
||||
else skill_level = 1;
|
||||
|
||||
return skill_level;
|
||||
}
|
||||
|
||||
|
||||
INLINE int PROFESSION_CHANGE_SKILL_LEVEL_A( int skill_level )
|
||||
{
|
||||
if( skill_level >= 100 ) skill_level = 10;
|
||||
else if( skill_level > 90 ) skill_level = 9;
|
||||
else if( skill_level > 80 ) skill_level = 8;
|
||||
else if( skill_level > 70 ) skill_level = 7;
|
||||
else if( skill_level > 60 ) skill_level = 6;
|
||||
else if( skill_level > 50 ) skill_level = 5;
|
||||
else if( skill_level > 40 ) skill_level = 4;
|
||||
else if( skill_level > 30 ) skill_level = 3;
|
||||
else if( skill_level > 20 ) skill_level = 2;
|
||||
else if( skill_level > 10 ) skill_level = 1;
|
||||
else skill_level = 0;
|
||||
|
||||
return skill_level;
|
||||
}
|
||||
#endif
|
||||
|
1067
char/title.c
Normal file
1067
char/title.c
Normal file
File diff suppressed because it is too large
Load Diff
2322
char/trade.c
Normal file
2322
char/trade.c
Normal file
File diff suppressed because it is too large
Load Diff
5011
configfile.c
Normal file
5011
configfile.c
Normal file
File diff suppressed because it is too large
Load Diff
779
const.c
Normal file
779
const.c
Normal file
@ -0,0 +1,779 @@
|
||||
#include "version.h"
|
||||
#include "common.h"
|
||||
|
||||
#include "char.h"
|
||||
#include "char_data.h"
|
||||
#include "item.h"
|
||||
#include "battle.h"
|
||||
#include "object.h"
|
||||
#ifdef _CAX_ADD_LUADX
|
||||
#include "enemy.h"
|
||||
#endif
|
||||
//0-1999 CHAR_getInt
|
||||
//2000-3999 CHAR_getChar
|
||||
//4000-5999 CHAR_getWorkInt
|
||||
//6000-7999 CHAR_getWorkChar
|
||||
//8000-9999 CHAR_getFlg
|
||||
#define LUA_DATALINE0 0
|
||||
#define LUA_DATALINE1 2000
|
||||
#define LUA_DATALINE2 4000
|
||||
#define LUA_DATALINE3 6000
|
||||
#define LUA_DATALINE4 8000
|
||||
#define LUA_DATALINE5 10000
|
||||
|
||||
typedef struct __lua_const {
|
||||
const char *name;
|
||||
unsigned int size;
|
||||
int vl;
|
||||
}lua_const;
|
||||
|
||||
lua_const M_Lua_RegConstList[] = {
|
||||
{"对像_序%", sizeof("对像_序%"), LUA_DATALINE0 + CHAR_DATAPLACENUMBER},
|
||||
{"对像_形象%", sizeof("对像_形象%"), LUA_DATALINE0 + CHAR_BASEIMAGENUMBER},
|
||||
{"对像_原形%", sizeof("对像_原形%"), LUA_DATALINE0 + CHAR_BASEBASEIMAGENUMBER},
|
||||
{"对像_脸%", sizeof("对像_脸%"), LUA_DATALINE0 + CHAR_FACEIMAGENUMBER},
|
||||
{"对像_地图%", sizeof("对像_地图%"), LUA_DATALINE0 + CHAR_FLOOR},
|
||||
{"对像_X%", sizeof("对像_X%"), LUA_DATALINE0 + CHAR_X},
|
||||
{"对像_Y%", sizeof("对像_Y%"), LUA_DATALINE0 + CHAR_Y},
|
||||
{"对像_方向%", sizeof("对像_方向%"), LUA_DATALINE0 + CHAR_DIR},
|
||||
{"对像_等级%", sizeof("对像_等级%"), LUA_DATALINE0 + CHAR_LV},
|
||||
{"对像_石币%", sizeof("对像_石币%"), LUA_DATALINE0 + CHAR_GOLD},
|
||||
{"对像_血%", sizeof("对像_血%"), LUA_DATALINE0 + CHAR_HP},
|
||||
{"对像_气%", sizeof("对像_气%"), LUA_DATALINE0 + CHAR_MP},
|
||||
{"对像_M气%", sizeof("对像_M气%"), LUA_DATALINE0 + CHAR_MAXMP},
|
||||
{"对像_体力%", sizeof("对像_体力%"), LUA_DATALINE0 + CHAR_VITAL},
|
||||
{"对像_腕力%", sizeof("对像_腕力%"), LUA_DATALINE0 + CHAR_STR},
|
||||
{"对像_耐力%", sizeof("对像_耐力%"), LUA_DATALINE0 + CHAR_TOUGH},
|
||||
{"对像_速度%", sizeof("对像_速度%"), LUA_DATALINE0 + CHAR_DEX},
|
||||
{"对像_魅力%", sizeof("对像_魅力%"), LUA_DATALINE0 + CHAR_CHARM},
|
||||
{"对像_运%", sizeof("对像_运%"), LUA_DATALINE0 + CHAR_LUCK},
|
||||
{"对像_地%", sizeof("对像_地%"), LUA_DATALINE0 + CHAR_EARTHAT},
|
||||
{"对像_水%", sizeof("对像_水%"), LUA_DATALINE0 + CHAR_WATERAT},
|
||||
{"对像_火%", sizeof("对像_火%"), LUA_DATALINE0 + CHAR_FIREAT},
|
||||
{"对像_风%", sizeof("对像_风%"), LUA_DATALINE0 + CHAR_WINDAT},
|
||||
{"对像_战宠%", sizeof("对像_战宠%"), LUA_DATALINE0 + CHAR_DEFAULTPET},
|
||||
{"对像_CL%", sizeof("对像_CL%"), LUA_DATALINE0 + CHAR_CRITIAL},
|
||||
{"对像_CR%", sizeof("对像_CR%"), LUA_DATALINE0 + CHAR_COUNTER},
|
||||
{"对像_珍稀%", sizeof("对像_珍稀%"), LUA_DATALINE0 + CHAR_RARE},
|
||||
{"对像_RH%", sizeof("对像_RH%"), LUA_DATALINE0 + CHAR_RADARSTRENGTH},
|
||||
{"对像_CE%", sizeof("对像_CE%"), LUA_DATALINE0 + CHAR_CHATVOLUME},
|
||||
{"对像_ML%", sizeof("对像_ML%"), LUA_DATALINE0 + CHAR_MERCHANTLEVEL},
|
||||
{"对像_记录%", sizeof("对像_记录%"), LUA_DATALINE0 + CHAR_SAVEPOINT},
|
||||
{"对像_DM%", sizeof("对像_DM%"), LUA_DATALINE0 + CHAR_DETERMINEITEM},
|
||||
{"对像_称号%", sizeof("对像_称号%"), LUA_DATALINE0 + CHAR_INDEXOFEQTITLE},
|
||||
{"对像_计毒%", sizeof("对像_计毒%"), LUA_DATALINE0 + CHAR_POISON},
|
||||
{"对像_计麻%", sizeof("对像_计麻%"), LUA_DATALINE0 + CHAR_PARALYSIS},
|
||||
{"对像_计默%", sizeof("对像_计默%"), LUA_DATALINE0 + CHAR_SLEEP},
|
||||
{"对像_计石%", sizeof("对像_计石%"), LUA_DATALINE0 + CHAR_STONE},
|
||||
{"对像_计暗%", sizeof("对像_计暗%"), LUA_DATALINE0 + CHAR_DRUNK},
|
||||
{"对像_计乱%", sizeof("对像_计乱%"), LUA_DATALINE0 + CHAR_CONFUSION},
|
||||
{"对像_登数%", sizeof("对像_登数%"), LUA_DATALINE0 + CHAR_LOGINCOUNT},
|
||||
{"对像_死次%", sizeof("对像_死次%"), LUA_DATALINE0 + CHAR_DEADCOUNT},
|
||||
{"对像_走次%", sizeof("对像_走次%"), LUA_DATALINE0 + CHAR_WALKCOUNT},
|
||||
{"对像_说次%", sizeof("对像_说次%"), LUA_DATALINE0 + CHAR_TALKCOUNT},
|
||||
{"对像_伤次%", sizeof("对像_伤次%"), LUA_DATALINE0 + CHAR_DAMAGECOUNT},
|
||||
{"对像_捕次%", sizeof("对像_捕次%"), LUA_DATALINE0 + CHAR_GETPETCOUNT},
|
||||
{"对像_杀怪%", sizeof("对像_杀怪%"), LUA_DATALINE0 + CHAR_KILLPETCOUNT},
|
||||
{"对像_宠死%", sizeof("对像_宠死%"), LUA_DATALINE0 + CHAR_DEADPETCOUNT},
|
||||
{"对像_邮数%", sizeof("对像_邮数%"), LUA_DATALINE0 + CHAR_SENDMAILCOUNT},
|
||||
{"对像_合数%", sizeof("对像_合数%"), LUA_DATALINE0 + CHAR_MERGEITEMCOUNT},
|
||||
{"对像_PK数%", sizeof("对像_PK数%"), LUA_DATALINE0 + CHAR_DUELBATTLECOUNT},
|
||||
{"对像_P赢数%", sizeof("对像_P赢数%"), LUA_DATALINE0 + CHAR_DUELWINCOUNT},
|
||||
{"对像_P输数%", sizeof("对像_P输数%"), LUA_DATALINE0 + CHAR_DUELLOSECOUNT},
|
||||
{"对像_P连数%", sizeof("对像_P连数%"), LUA_DATALINE0 + CHAR_DUELSTWINCOUNT},
|
||||
{"对像_P最高%", sizeof("对像_P最高%"), LUA_DATALINE0 + CHAR_DUELMAXSTWINCOUNT},
|
||||
{"对像_类型%", sizeof("对像_类型%"), LUA_DATALINE0 + CHAR_WHICHTYPE},
|
||||
{"对像_移间%", sizeof("对像_移间%"), LUA_DATALINE0 + CHAR_WALKINTERVAL},
|
||||
{"对像_循时%", sizeof("对像_循时%"), LUA_DATALINE0 + CHAR_LOOPINTERVAL},
|
||||
#ifdef _NEWOPEN_MAXEXP
|
||||
{"对像_旧经%", sizeof("对像_旧经%"), LUA_DATALINE0 + CHAR_OLDEXP},
|
||||
{"对像_经验%", sizeof("对像_经验%"), LUA_DATALINE0 + CHAR_EXP},
|
||||
#else
|
||||
{"对像_经验%", sizeof("对像_经验%"), LUA_DATALINE0 + CHAR_EXP},
|
||||
#endif
|
||||
|
||||
#ifdef _CAX_ADD_LUADX
|
||||
{"对像_血MAX%", sizeof("对像_血MAX%"), LUA_DATALINE0 + CHAR_WORKMAXHP},
|
||||
{"对像_气MAX%", sizeof("对像_气MAX%"), LUA_DATALINE0 + CHAR_WORKMAXMP},
|
||||
{"对像_家族地图%", sizeof("对像_家族地图%"), LUA_DATALINE2 + CHAR_WORKFMFLOOR},
|
||||
{"对像_成长%", sizeof("对像_成长%"), LUA_DATALINE0 + CHAR_ALLOCPOINT},
|
||||
{"对像_PETRANK%", sizeof("对像_PETRANK%"), LUA_DATALINE0 + CHAR_PETRANK},
|
||||
{"对像_ENEMYBASE编号%", sizeof("对像_ENEMYBASE编号%"), LUA_DATALINE0 + CHAR_PETID},
|
||||
{"对像_摆摊%", sizeof("对像_摆摊%"), LUA_DATALINE0 + CHAR_WORKSTREETVENDOR},
|
||||
{"对像_看摊者%", sizeof("对像_看摊者%"), LUA_DATALINE0 + CHAR_WORKSTREETVENDOR_WHO},
|
||||
{"对像_摊名%", sizeof("对像_摊名%"), LUA_DATALINE0 + CHAR_STREETVENDOR_NAME},
|
||||
{"对像_婚否%", sizeof("对像_婚否%"), LUA_DATALINE0 + CHAR_LOVE},
|
||||
{"对像_配偶帐%", sizeof("对像_配偶帐%"), LUA_DATALINE0 + CHAR_LOVERID},
|
||||
{"对像_配偶名%", sizeof("对像_配偶名%"), LUA_DATALINE0 + CHAR_LOVERNAME},
|
||||
{"成长_速度%", sizeof("成长_速度%"), 0},
|
||||
{"成长_耐力%", sizeof("成长_耐力%"), 1},
|
||||
{"成长_腕力%", sizeof("成长_腕力%"), 2},
|
||||
{"成长_体力%", sizeof("成长_体力%"), 3},
|
||||
{"对像_速度成长%", sizeof("对像_速度成长%"), 0},
|
||||
{"对像_耐力成长%", sizeof("对像_耐力成长%"), 1},
|
||||
{"对像_腕力成长%", sizeof("对像_腕力成长%"), 2},
|
||||
{"对像_体力成长%", sizeof("对像_体力成长%"), 3},
|
||||
{"宠模_编号%", sizeof("宠模_编号%"), LUA_DATALINE0 + E_T_TEMPNO},
|
||||
{"宠模_初始%", sizeof("宠模_初始%"), LUA_DATALINE0 + E_T_INITNUM},
|
||||
{"宠模_升级点%", sizeof("宠模_升级点%"), E_T_LVUPPOINT},
|
||||
{"宠模_体力%", sizeof("宠模_体力%"), LUA_DATALINE0 + E_T_BASEVITAL},
|
||||
{"宠模_腕力%", sizeof("宠模_腕力%"), LUA_DATALINE0 + E_T_BASESTR},
|
||||
{"宠模_耐力%", sizeof("宠模_耐力%"), LUA_DATALINE0 + E_T_BASETGH},
|
||||
{"宠模_速度%", sizeof("宠模_速度%"), LUA_DATALINE0 + E_T_BASEDEX},
|
||||
{"宠模_AI%", sizeof("宠模_AI%"), LUA_DATALINE0 + E_T_MODAI},
|
||||
{"宠模_GET%", sizeof("宠模_GET%"), LUA_DATALINE0 + E_T_GET},
|
||||
{"宠模_地%", sizeof("宠模_地%"), LUA_DATALINE0 + E_T_EARTHAT},
|
||||
{"宠模_水%", sizeof("宠模_水%"), LUA_DATALINE0 + E_T_WATERAT},
|
||||
{"宠模_火%", sizeof("宠模_火%"), LUA_DATALINE0 + E_T_FIREAT},
|
||||
{"宠模_风%", sizeof("宠模_风%"), LUA_DATALINE0 + E_T_WINDAT},
|
||||
{"宠模_毒抗%", sizeof("宠模_毒抗%"), LUA_DATALINE0 + E_T_POISON},
|
||||
{"宠模_麻抗%", sizeof("宠模_麻抗%"), LUA_DATALINE0 + E_T_PARALYSIS},
|
||||
{"宠模_默抗%", sizeof("宠模_默抗%"), LUA_DATALINE0 + E_T_SLEEP},
|
||||
{"宠模_石抗%", sizeof("宠模_石抗%"), LUA_DATALINE0 + E_T_STONE},
|
||||
{"宠模_醉抗%", sizeof("宠模_醉抗%"), LUA_DATALINE0 + E_T_DRUNK},
|
||||
{"宠模_乱抗%", sizeof("宠模_乱抗%"), LUA_DATALINE0 + E_T_CONFUSION},
|
||||
{"宠模_宠技1%", sizeof("宠模_宠技1%"), LUA_DATALINE0 + E_T_PETSKILL1},
|
||||
{"宠模_宠技2%", sizeof("宠模_宠技2%"), LUA_DATALINE0 + E_T_PETSKILL2},
|
||||
{"宠模_宠技3%", sizeof("宠模_宠技3%"), LUA_DATALINE0 + E_T_PETSKILL3},
|
||||
{"宠模_宠技4%", sizeof("宠模_宠技4%"), LUA_DATALINE0 + E_T_PETSKILL4},
|
||||
{"宠模_宠技5%", sizeof("宠模_宠技5%"), LUA_DATALINE0 + E_T_PETSKILL5},
|
||||
{"宠模_宠技6%", sizeof("宠模_宠技6%"), LUA_DATALINE0 + E_T_PETSKILL6},
|
||||
{"宠模_宠技7%", sizeof("宠模_宠技7%"), LUA_DATALINE0 + E_T_PETSKILL7},
|
||||
{"宠模_珍稀%", sizeof("宠模_珍稀%"), LUA_DATALINE0 + E_T_RARE},
|
||||
{"宠模_会心%", sizeof("宠模_会心%"), LUA_DATALINE0 + E_T_CRITICAL},
|
||||
{"宠模_反击%", sizeof("宠模_反击%"), LUA_DATALINE0 + E_T_COUNTER},
|
||||
{"宠模_技格%", sizeof("宠模_技格%"), LUA_DATALINE0 + E_T_SLOT},
|
||||
{"宠模_图档%", sizeof("宠模_图档%"), LUA_DATALINE0 + E_T_IMGNUMBER},
|
||||
{"宠模_FLG%", sizeof("宠模_FLG%"), LUA_DATALINE0 + E_T_PETFLG},
|
||||
{"宠模_尺寸%", sizeof("宠模_尺寸%"), LUA_DATALINE0 + E_T_SIZE},
|
||||
{"宠模_级限%", sizeof("宠模_级限%"), LUA_DATALINE0 + E_T_LIMITLEVEL},
|
||||
{"宠模_融合码%", sizeof("宠模_融合码%"), LUA_DATALINE0 + E_T_FUSIONCODE},
|
||||
{"宠模_原名%", sizeof("宠模_原名%"), LUA_DATALINE1 + E_T_NAME},
|
||||
#endif
|
||||
|
||||
{"对像_出生%", sizeof("对像_出生%"), LUA_DATALINE0 + CHAR_LASTTALKELDER},
|
||||
{"对像_配点%", sizeof("对像_配点%"), LUA_DATALINE0 + CHAR_SKILLUPPOINT},
|
||||
{"对像_LT%", sizeof("对像_LT%"), LUA_DATALINE0 + CHAR_LEVELUPPOINT},
|
||||
{"对像_图类%", sizeof("对像_图类%"), LUA_DATALINE0 + CHAR_IMAGETYPE},
|
||||
{"对像_CLR%", sizeof("对像_CLR%"), LUA_DATALINE0 + CHAR_NAMECOLOR},
|
||||
{"对像_话色%", sizeof("对像_话色%"), LUA_DATALINE0 + CHAR_POPUPNAMECOLOR},
|
||||
{"对像_设运%", sizeof("对像_设运%"), LUA_DATALINE0 + CHAR_LASTTIMESETLUCK},
|
||||
{"对像_DP%", sizeof("对像_DP%"), LUA_DATALINE0 + CHAR_DUELPOINT},
|
||||
{"对像_转数%", sizeof("对像_转数%"), LUA_DATALINE0 + CHAR_TRANSMIGRATION},
|
||||
{"对像_转参%", sizeof("对像_转参%"), LUA_DATALINE0 + CHAR_TRANSEQUATION},
|
||||
{"对像_IA%", sizeof("对像_IA%"), LUA_DATALINE0 + CHAR_INITDATA},
|
||||
{"对像_禁时%", sizeof("对像_禁时%"), LUA_DATALINE0 + CHAR_SILENT},
|
||||
{"对像_族引%", sizeof("对像_族引%"), LUA_DATALINE0 + CHAR_FMINDEX},
|
||||
{"对像_族职%", sizeof("对像_族职%"), LUA_DATALINE0 + CHAR_FMLEADERFLAG},
|
||||
{"对像_守精%", sizeof("对像_守精%"), LUA_DATALINE0 + CHAR_FMSPRITE},
|
||||
{"对像_个银%", sizeof("对像_个银%"), LUA_DATALINE0 + CHAR_BANKGOLD},
|
||||
{"对像_骑宠%", sizeof("对像_骑宠%"), LUA_DATALINE0 + CHAR_RIDEPET},
|
||||
{"对像_骑等%", sizeof("对像_骑等%"), LUA_DATALINE0 + CHAR_LEARNRIDE},
|
||||
{"对像_咒等%", sizeof("对像_咒等%"), LUA_DATALINE0 + CHAR_LIMITLEVEL},
|
||||
#ifdef _PET_FUSION
|
||||
{"对像_物码%", sizeof("对像_物码%"), LUA_DATALINE0 + CHAR_FUSIONCODE},
|
||||
{"对像_孵宠%", sizeof("对像_孵宠%"), LUA_DATALINE0 + CHAR_FUSIONINDEX},
|
||||
{"对像_养次%", sizeof("对像_养次%"), LUA_DATALINE0 + CHAR_FUSIONRAISE},
|
||||
{"对像_蛋标%", sizeof("对像_蛋标%"), LUA_DATALINE0 + CHAR_FUSIONBEIT},
|
||||
{"对像_养时%", sizeof("对像_养时%"), LUA_DATALINE0 + CHAR_FUSIONTIMELIMIT},
|
||||
#endif
|
||||
#ifdef _DEATH_CONTEND
|
||||
{"对像_队标%", sizeof("对像_队标%"), LUA_DATALINE0 + CHAR_PKLISTTEAMNUM},
|
||||
{"对像_领标%", sizeof("对像_领标%"), LUA_DATALINE0 + CHAR_PKLISTLEADER},
|
||||
#endif
|
||||
#ifdef _PERSONAL_FAME
|
||||
{"对像_声望%", sizeof("对像_声望%"), LUA_DATALINE0 + CHAR_FAME},
|
||||
#endif
|
||||
#ifdef _CAX_Mercenary
|
||||
{"对像_佣兵经验%", sizeof("对像_佣兵经验%"), LUA_DATALINE0 + CHAR_MERCENARY}, //佣兵经验
|
||||
#endif
|
||||
#ifdef _VIP_RIDE
|
||||
{"对像_VIP类型%", sizeof("对像_VIP类型%"), LUA_DATALINE0 + CHAR_VIPRIDE},
|
||||
{"对像_VIP时间%", sizeof("对像_VIP时间%"), LUA_DATALINE0 + CHAR_VIPTIME},
|
||||
#endif
|
||||
#ifdef _VIP_SERVER
|
||||
{"对像_积分%", sizeof("对像_积分%"), LUA_DATALINE0 + CHAR_AMPOINT},
|
||||
#endif
|
||||
#ifdef _EV_NUM
|
||||
{"对像_跑环%", sizeof("对像_跑环%"), LUA_DATALINE0 + CHAR_EVNUM},
|
||||
#endif
|
||||
{"对像_任务链%", sizeof("对像_任务链%"), LUA_DATALINE0 + CHAR_MISSIONTRAIN_NUM},
|
||||
{"对像_任务链时间%", sizeof("对像_任务链时间%"), LUA_DATALINE0 + CHAR_MISSIONTRAIN_TIME},
|
||||
{"对像_环数%", sizeof("对像_环数%"), LUA_DATALINE0 + CHAR_MISSIONTRAIN_NUM}, // 跑环数
|
||||
{"对像_进化%", sizeof("对像_进化%"), LUA_DATALINE0 + CHAR_EVOLVE},
|
||||
{"对像_在线时间%", sizeof("对像_在线时间%"), LUA_DATALINE0 + CHAR_ONLINE_TIME},
|
||||
{"对像_楼层时间%", sizeof("对像_楼层时间%"), LUA_DATALINE0 + CHAR_FLOORDIFI_TIME},
|
||||
{"对像_极品%", sizeof("对像_极品%"), LUA_DATALINE0 + CHAR_SUPER},
|
||||
{"对像_称号等级%", sizeof("对像_称号等级%"), LUA_DATALINE0 + CHAR_TITLE_LV},
|
||||
{"对像_称号时间%", sizeof("对像_称号时间%"), LUA_DATALINE0 + CHAR_TITLE_TIME},
|
||||
{"对像_任务计时%", sizeof("对像_任务计时%"), LUA_DATALINE0 + CHAR_MISSION_TIME},
|
||||
|
||||
#ifdef _ATTACK_MAGIC
|
||||
{"对像_地魔熟%", sizeof("对像_地魔熟%"), LUA_DATALINE0 + CHAR_EARTH_EXP},
|
||||
{"对像_水魔熟%", sizeof("对像_水魔熟%"), LUA_DATALINE0 + CHAR_WATER_EXP},
|
||||
{"对像_火魔熟%", sizeof("对像_火魔熟%"), LUA_DATALINE0 + CHAR_FIRE_EXP},
|
||||
{"对像_风魔熟%", sizeof("对像_风魔熟%"), LUA_DATALINE0 + CHAR_WIND_EXP},
|
||||
{"对像_地魔抗%", sizeof("对像_地魔抗%"), LUA_DATALINE0 + CHAR_EARTH_RESIST},
|
||||
{"对像_水魔抗%", sizeof("对像_水魔抗%"), LUA_DATALINE0 + CHAR_WATER_RESIST},
|
||||
{"对像_火魔抗%", sizeof("对像_火魔抗%"), LUA_DATALINE0 + CHAR_FIRE_RESIST},
|
||||
{"对像_风魔抗%", sizeof("对像_风魔抗%"), LUA_DATALINE0 + CHAR_WIND_RESIST},
|
||||
{"对像_地熟经%", sizeof("对像_地熟经%"), LUA_DATALINE0 + CHAR_EARTH_ATTMAGIC_EXP},
|
||||
{"对像_水熟经%", sizeof("对像_水熟经%"), LUA_DATALINE0 + CHAR_WATER_ATTMAGIC_EXP},
|
||||
{"对像_火熟经%", sizeof("对像_火熟经%"), LUA_DATALINE0 + CHAR_FIRE_ATTMAGIC_EXP},
|
||||
{"对像_风熟经%", sizeof("对像_风熟经%"), LUA_DATALINE0 + CHAR_WIND_ATTMAGIC_EXP},
|
||||
{"对像_地抗经%", sizeof("对像_地抗经%"), LUA_DATALINE0 + CHAR_EARTH_DEFMAGIC_EXP},
|
||||
{"对像_水抗经%", sizeof("对像_水抗经%"), LUA_DATALINE0 + CHAR_WATER_DEFMAGIC_EXP},
|
||||
{"对像_火抗经%", sizeof("对像_火抗经%"), LUA_DATALINE0 + CHAR_FIRE_DEFMAGIC_EXP},
|
||||
{"对像_风抗经%", sizeof("对像_风抗经%"), LUA_DATALINE0 + CHAR_WIND_DEFMAGIC_EXP},
|
||||
#endif
|
||||
#ifdef _GAMBLE_BANK
|
||||
{"对像_赌银%", sizeof("对像_赌银%"), LUA_DATALINE0 + CHAR_PERSONAGOLD},
|
||||
#endif
|
||||
#ifdef _DROPSTAKENEW
|
||||
{"对像_赌分%", sizeof("对像_赌分%"), LUA_DATALINE0 + CHAR_GAMBLENUM},
|
||||
#endif
|
||||
#ifdef _AUCTIONEER
|
||||
{"对像_拍得%", sizeof("对像_拍得%"), LUA_DATALINE0 + CHAR_AUCGOLD},
|
||||
#endif
|
||||
#ifdef _PET_EVOLUTION
|
||||
{"对像_血药数%", sizeof("对像_血药数%"), LUA_DATALINE0 + CHAR_EVOLUTIONBASEVTL},
|
||||
{"对像_攻药数%", sizeof("对像_攻药数%"), LUA_DATALINE0 + CHAR_EVOLUTIONBASESTR},
|
||||
{"对像_防药数%", sizeof("对像_防药数%"), LUA_DATALINE0 + CHAR_EVOLUTIONBASETGH},
|
||||
{"对像_敏药数%", sizeof("对像_敏药数%"), LUA_DATALINE0 + CHAR_EVOLUTIONBASEDEX},
|
||||
#endif
|
||||
#ifdef _FAMILYBANKSTONELOG
|
||||
{"对像_族银%", sizeof("对像_族银%"), LUA_DATALINE0 + CHAR_FMBANKGOLD},
|
||||
#endif
|
||||
#ifdef _FM_JOINLIMIT
|
||||
{"对像_加族间%", sizeof("对像_加族间%"), LUA_DATALINE0 + CHAR_FMTIMELIMIT},
|
||||
#endif
|
||||
#ifdef _CHAR_PROFESSION // WON ADD 人物职业
|
||||
{"对像_职业%", sizeof("对像_职业%"), LUA_DATALINE0 + PROFESSION_CLASS},
|
||||
{"对像_职等%", sizeof("对像_职等%"), LUA_DATALINE0 + PROFESSION_LEVEL},
|
||||
//{"对像_职经", sizeof("对像_职经"), LUA_DATALINE0 + PROFESSION_EXP},
|
||||
{"对像_职技点%", sizeof("对像_职技点%"), LUA_DATALINE0 + PROFESSION_SKILL_POINT},
|
||||
{"对像_职增叠%", sizeof("对像_职增叠%"), LUA_DATALINE0 + ATTACHPILE},
|
||||
{"对像_职火熟%", sizeof("对像_职火熟%"), LUA_DATALINE0 + PROFESSION_FIRE_P},
|
||||
{"对像_职冰熟%", sizeof("对像_职冰熟%"), LUA_DATALINE0 + PROFESSION_ICE_P},
|
||||
{"对像_职雷熟%", sizeof("对像_职雷熟%"), LUA_DATALINE0 + PROFESSION_THUNDER_P},
|
||||
{"对像_职火抗%", sizeof("对像_职火抗%"), LUA_DATALINE0 + PROFESSION_FIRE_R},
|
||||
{"对像_职冰抗%", sizeof("对像_职冰抗%"), LUA_DATALINE0 + PROFESSION_ICE_R},
|
||||
{"对像_职雷抗%", sizeof("对像_职雷抗%"), LUA_DATALINE0 + PROFESSION_THUNDER_R},
|
||||
#endif
|
||||
#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC
|
||||
{"对像_战层%", sizeof("对像_战层%"), LUA_DATALINE0 + CHAR_HEROFLOOR},
|
||||
#endif
|
||||
#ifdef _PETSKILL_BECOMEPIG
|
||||
{"对像_乌力时%", sizeof("对像_乌力时%"), LUA_DATALINE0 + CHAR_BECOMEPIG},
|
||||
{"对像_乌力样%", sizeof("对像_乌力样%"), LUA_DATALINE0 + CHAR_BECOMEPIG_BBI},
|
||||
#endif
|
||||
{"对像_离线时%", sizeof("对像_离线时%"), LUA_DATALINE0 + CHAR_LASTLEAVETIME},
|
||||
#ifdef _NEW_MANOR_LAW
|
||||
{"对像_气势%", sizeof("对像_气势%"), LUA_DATALINE0 + CHAR_MOMENTUM},
|
||||
#endif
|
||||
#ifdef _ANGEL_SUMMON
|
||||
{"对像_勇数%", sizeof("对像_勇数%"), LUA_DATALINE0 + CHAR_HEROCNT},
|
||||
#endif
|
||||
#ifdef _TEACHER_SYSTEM
|
||||
{"对像_导声望%", sizeof("对像_导声望%"), LUA_DATALINE0 + CHAR_TEACHER_FAME},
|
||||
#endif
|
||||
#ifdef _CAX_ESC_REPORT
|
||||
{"对像_签到%", sizeof("对像_签到%"), LUA_DATALINE0 + CHAR_REPORT},
|
||||
#endif
|
||||
#ifdef _RACEMAN
|
||||
{"对像_CKN%", sizeof("对像_CKN%"), LUA_DATALINE0 + CHAR_CHECKIN},
|
||||
{"对像_CN1%", sizeof("对像_CN1%"), LUA_DATALINE0 + CHAR_CATCHCNT1},
|
||||
{"对像_CN2%", sizeof("对像_CN2%"), LUA_DATALINE0 + CHAR_CATCHCNT2},
|
||||
{"对像_CN3%", sizeof("对像_CN3%"), LUA_DATALINE0 + CHAR_CATCHCNT3},
|
||||
{"对像_CN4%", sizeof("对像_CN4%"), LUA_DATALINE0 + CHAR_CATCHCNT4},
|
||||
{"对像_CN5%", sizeof("对像_CN5%"), LUA_DATALINE0 + CHAR_CATCHCNT5},
|
||||
{"对像_KN1%", sizeof("对像_KN1%"), LUA_DATALINE0 + CHAR_KINDCNT1},
|
||||
{"对像_KN2%", sizeof("对像_KN2%"), LUA_DATALINE0 + CHAR_KINDCNT2},
|
||||
{"对像_KN3%", sizeof("对像_KN3%"), LUA_DATALINE0 + CHAR_KINDCNT3},
|
||||
{"对像_KN4%", sizeof("对像_KN4%"), LUA_DATALINE0 + CHAR_KINDCNT4},
|
||||
{"对像_KN5%", sizeof("对像_KN5%"), LUA_DATALINE0 + CHAR_KINDCNT5},
|
||||
{"对像_KN6%", sizeof("对像_KN6%"), LUA_DATALINE0 + CHAR_KINDCNT6},
|
||||
{"对像_KN7%", sizeof("对像_KN7%"), LUA_DATALINE0 + CHAR_KINDCNT7},
|
||||
{"对像_KN8%", sizeof("对像_KN8%"), LUA_DATALINE0 + CHAR_KINDCNT8},
|
||||
{"对像_KN9%", sizeof("对像_KN9%"), LUA_DATALINE0 + CHAR_KINDCNT9},
|
||||
{"对像_KN10%", sizeof("对像_KN10%"), LUA_DATALINE0 + CHAR_KINDCNT10},
|
||||
#endif
|
||||
{"对像_祝福%", sizeof("对像_祝福%"), LUA_DATALINE0 + CHAR_BEATITUDE},
|
||||
#ifdef _VIGOR_SYS
|
||||
{"对像_活力%", sizeof("对像_活力%"), LUA_DATALINE0 + CHAR_VIGOR},
|
||||
#endif
|
||||
{"对像_整数缓存1%", sizeof("对像_整数缓存1%"), LUA_DATALINE0 + CHAR_LUASAVE_WORKINT_1}, //lua存储 玩家下线清零
|
||||
{"对像_整数缓存2%", sizeof("对像_整数缓存2%"), LUA_DATALINE0 + CHAR_LUASAVE_WORKINT_2}, //lua存储 玩家下线清零
|
||||
{"对像_整数缓存3%", sizeof("对像_整数缓存3%"), LUA_DATALINE0 + CHAR_LUASAVE_WORKINT_3}, //lua存储 玩家下线清零
|
||||
{"对像_整数存储1%", sizeof("对像_整数存储1%"), LUA_DATALINE0 + CHAR_LUASAVE_INT_1}, //整数存储,保存至存档内
|
||||
{"对像_整数存储2%", sizeof("对像_整数存储2%"), LUA_DATALINE0 + CHAR_LUASAVE_INT_2}, //整数存储,保存至存档内
|
||||
{"对像_整数存储3%", sizeof("对像_整数存储3%"), LUA_DATALINE0 + CHAR_LUASAVE_INT_3}, //整数存储,保存至存档内
|
||||
// {"对像_IP%",sizeof("对像_IP%"),LUA_DATALINE1 + CHAR_CHARPLAYIP},
|
||||
|
||||
{"对像_会员等级%", sizeof("对像_会员等级%"), LUA_DATALINE0 + CHAR_VIPRIDE},
|
||||
{"对像_会员时间%", sizeof("对像_会员时间%"), LUA_DATALINE0 + CHAR_VIPTIME},
|
||||
|
||||
{"对像_NPC时间%", sizeof("对像_NPC时间%"), LUA_DATALINE0 + CHAR_NPCTIME},
|
||||
|
||||
{"对像_原名%", sizeof("对像_原名%"), LUA_DATALINE1 + CHAR_NAME},
|
||||
{"对像_名称%", sizeof("对像_名称%"), LUA_DATALINE1 + CHAR_USERPETNAME},
|
||||
{"对像_帐号%", sizeof("对像_帐号%"), LUA_DATALINE1 + CHAR_CDKEY},
|
||||
{"对像_属帐%", sizeof("对像_属帐%"), LUA_DATALINE1 + CHAR_OWNERCDKEY},
|
||||
{"对像_属人%", sizeof("对像_属人%"), LUA_DATALINE1 + CHAR_OWNERCHARANAME},
|
||||
{"对像_家族名%", sizeof("对像_家族名%"), LUA_DATALINE1 + CHAR_FMNAME},
|
||||
#ifdef _TEACHER_SYSTEM
|
||||
{"对像_导师帐%", sizeof("对像_导师帐%"), LUA_DATALINE1 + CHAR_TEACHER_ID},
|
||||
{"对像_导师名%", sizeof("对像_导师名%"), LUA_DATALINE1 + CHAR_TEACHER_NAME},
|
||||
#endif
|
||||
#ifdef _CAX_LUA_BETT01
|
||||
{"对像_战接1%", sizeof("对像_战接1%"), LUA_DATALINE2 + CHAR_WORKBATTLECOM1},
|
||||
{"对像_战接2%", sizeof("对像_战接2%"), LUA_DATALINE2 + CHAR_WORKBATTLECOM2},
|
||||
{"对像_战模%", sizeof("对像_战模%"), LUA_DATALINE2 + CHAR_WORKBATTLEMODE},
|
||||
#endif
|
||||
{"对像_队模式%", sizeof("对像_队模式%"), LUA_DATALINE2 + CHAR_WORKPARTYMODE},
|
||||
{"对像_物索引%", sizeof("对像_物索引%"), LUA_DATALINE2 + CHAR_WORKOBJINDEX},
|
||||
#ifdef _ADD_ACTION //npc动作
|
||||
{"对像_动作%", sizeof("对像_动作%"), LUA_DATALINE2 + CHAR_WORKACTION},
|
||||
#endif
|
||||
{"对像_LUA%", sizeof("对像_LUA%"), LUA_DATALINE2 + CHAR_WORKLUANPCINT},
|
||||
{"对像_1LUA%", sizeof("对像_1LUA%"), LUA_DATALINE2 + CHAR_WORKLUANPCINT1},
|
||||
|
||||
{"对像_IAK%", sizeof("对像_IAK%"), LUA_DATALINE4 + CHAR_ISATTACK},
|
||||
{"对像_战令%", sizeof("对像_战令%"), LUA_DATALINE4 + CHAR_ISATTACKED},
|
||||
{"对像_IOR%", sizeof("对像_IOR%"), LUA_DATALINE4 + CHAR_ISOVER},
|
||||
{"对像_档路%", sizeof("对像_档路%"), LUA_DATALINE4 + CHAR_ISOVERED},
|
||||
{"对像_HHT%", sizeof("对像_HHT%"), LUA_DATALINE4 + CHAR_HAVEHEIGHT},
|
||||
{"对像_隐身%", sizeof("对像_隐身%"), LUA_DATALINE4 + CHAR_ISVISIBLE},
|
||||
{"对像_ITP%", sizeof("对像_ITP%"), LUA_DATALINE4 + CHAR_ISTRANSPARENT},
|
||||
{"对像_IFG%", sizeof("对像_IFG%"), LUA_DATALINE4 + CHAR_ISFLYING},
|
||||
{"对像_死亡%", sizeof("对像_死亡%"), LUA_DATALINE4 + CHAR_ISDIE},
|
||||
{"对像_IBIG%", sizeof("对像_IBIG%"), LUA_DATALINE4 + CHAR_ISBIG},
|
||||
{"对像_显战%", sizeof("对像_显战%"), LUA_DATALINE4 + CHAR_ISSHOWBATTLEMSG},
|
||||
{"对像_组队标%", sizeof("对像_组队标%"), LUA_DATALINE4 + CHAR_ISPARTY},
|
||||
{"对像_允许记%", sizeof("对像_允许记%"), LUA_DATALINE4 + CHAR_ISWARP},
|
||||
{"对像_族战标%", sizeof("对像_族战标%"), LUA_DATALINE4 + CHAR_ISDUEL},
|
||||
{"对像_队聊标%", sizeof("对像_队聊标%"), LUA_DATALINE4 + CHAR_ISPARTYCHAT},
|
||||
{"对像_名片标%", sizeof("对像_名片标%"), LUA_DATALINE4 + CHAR_ISTRADECARD},
|
||||
{"对像_交易标%", sizeof("对像_交易标%"), LUA_DATALINE4 + CHAR_ISTRADE},
|
||||
#ifdef _CHANNEL_MODIFY
|
||||
{"对像_密频标%", sizeof("对像_密频标%"), LUA_DATALINE4 + CHAR_ISTELL},
|
||||
{"对像_族频标%", sizeof("对像_族频标%"), LUA_DATALINE4 + CHAR_ISFM},
|
||||
{"对像_职频标%", sizeof("对像_职频标%"), LUA_DATALINE4 + CHAR_ISOCC},
|
||||
{"对像_对话存%", sizeof("对像_对话存%"), LUA_DATALINE4 + CHAR_ISSAVE},
|
||||
{"对像_聊频标%", sizeof("对像_聊频标%"), LUA_DATALINE4 + CHAR_ISCHAT},
|
||||
#endif
|
||||
|
||||
{"道具_ID%", sizeof("道具_ID%"), LUA_DATALINE0 + ITEM_ID},
|
||||
{"道具_图号%", sizeof("道具_图号%"), LUA_DATALINE0 + ITEM_BASEIMAGENUMBER},
|
||||
{"道具_成本%", sizeof("道具_成本%"), LUA_DATALINE0 + ITEM_COST},
|
||||
{"道具_类型%", sizeof("道具_类型%"), LUA_DATALINE0 + ITEM_TYPE},
|
||||
{"道具_AUF%", sizeof("道具_AUF%"), LUA_DATALINE0 + ITEM_ABLEUSEFIELD},
|
||||
{"道具_TARGET%", sizeof("道具_TARGET%"), LUA_DATALINE0 + ITEM_TARGET},
|
||||
{"道具_等级%", sizeof("道具_等级%"), LUA_DATALINE0 + ITEM_LEVEL},
|
||||
#ifdef _ITEM_MAXUSERNUM
|
||||
{"道具_次数%", sizeof("道具_次数%"), LUA_DATALINE0 + ITEM_DAMAGEBREAK},
|
||||
#endif
|
||||
#ifdef _ITEMSET4_TXT
|
||||
{"道具_堆叠%", sizeof("道具_堆叠%"), LUA_DATALINE0 + ITEM_USEPILENUMS},
|
||||
{"道具_可叠%", sizeof("道具_可叠%"), LUA_DATALINE0 + ITEM_CANBEPILE},
|
||||
{"道具_STR%", sizeof("道具_STR%"), LUA_DATALINE0 + ITEM_NEEDSTR},
|
||||
{"道具_DEX%", sizeof("道具_DEX%"), LUA_DATALINE0 + ITEM_NEEDDEX},
|
||||
{"道具_转数%", sizeof("道具_转数%"), LUA_DATALINE0 + ITEM_NEEDTRANS},
|
||||
{"道具_职业%", sizeof("道具_职业%"), LUA_DATALINE0 + ITEM_NEEDPROFESSION},
|
||||
#endif
|
||||
#ifdef _TAKE_ITEMDAMAGE
|
||||
{"道具_耐久%", sizeof("道具_耐久%"), LUA_DATALINE0 + ITEM_DAMAGECRUSHE},
|
||||
{"道具_MAX耐久%", sizeof("道具_MAX耐久%"), LUA_DATALINE0 + ITEM_MAXDAMAGECRUSHE},
|
||||
#endif
|
||||
#ifdef _ADD_DEAMGEDEFC
|
||||
{"道具_伤%", sizeof("道具_伤%"), LUA_DATALINE0 + ITEM_OTHERDAMAGE},
|
||||
{"道具_吸%", sizeof("道具_吸%"), LUA_DATALINE0 + ITEM_OTHERDEFC},
|
||||
#endif
|
||||
#ifdef _SUIT_ITEM
|
||||
{"道具_套%", sizeof("道具_套%"), LUA_DATALINE0 + ITEM_SUITCODE},
|
||||
#endif
|
||||
{"道具_AKMIN%", sizeof("道具_AKMIN%"), LUA_DATALINE0 + ITEM_ATTACKNUM_MIN},
|
||||
{"道具_AKMAX%", sizeof("道具_AKMAX%"), LUA_DATALINE0 + ITEM_ATTACKNUM_MAX},
|
||||
{"道具_附攻%", sizeof("道具_附攻%"), LUA_DATALINE0 + ITEM_MODIFYATTACK},
|
||||
{"道具_附防%", sizeof("道具_附防%"), LUA_DATALINE0 + ITEM_MODIFYDEFENCE},
|
||||
{"道具_附敏%", sizeof("道具_附敏%"), LUA_DATALINE0 + ITEM_MODIFYQUICK},
|
||||
{"道具_附体%", sizeof("道具_附体%"), LUA_DATALINE0 + ITEM_MODIFYHP},
|
||||
{"道具_附气%", sizeof("道具_附气%"), LUA_DATALINE0 + ITEM_MODIFYMP},
|
||||
{"道具_附运%", sizeof("道具_附运%"), LUA_DATALINE0 + ITEM_MODIFYLUCK},
|
||||
{"道具_附魅%", sizeof("道具_附魅%"), LUA_DATALINE0 + ITEM_MODIFYCHARM},
|
||||
{"道具_附避%", sizeof("道具_附避%"), LUA_DATALINE0 + ITEM_MODIFYAVOID},
|
||||
{"道具_属性%", sizeof("道具_属性%"), LUA_DATALINE0 + ITEM_MODIFYATTRIB},
|
||||
{"道具_属性值%", sizeof("道具_属性值%"), LUA_DATALINE0 + ITEM_MODIFYATTRIBVALUE},
|
||||
{"道具_精灵%", sizeof("道具_精灵%"), LUA_DATALINE0 + ITEM_MAGICID},
|
||||
{"道具_精灵率%", sizeof("道具_精灵率%"), LUA_DATALINE0 + ITEM_MAGICPROB},
|
||||
{"道具_精灵耗%", sizeof("道具_精灵耗%"), LUA_DATALINE0 + ITEM_MAGICUSEMP},
|
||||
#ifdef _ITEMSET5_TXT
|
||||
{"道具_格档率%", sizeof("道具_格档率%"), LUA_DATALINE0 + ITEM_MODIFYARRANGE},
|
||||
{"道具_攻序%", sizeof("道具_攻序%"), LUA_DATALINE0 + ITEM_MODIFYSEQUENCE},
|
||||
{"道具_负重%", sizeof("道具_负重%"), LUA_DATALINE0 + ITEM_ATTACHPILE},
|
||||
{"道具_命中%", sizeof("道具_命中%"), LUA_DATALINE0 + ITEM_HITRIGHT},
|
||||
#endif
|
||||
#ifdef _ITEMSET6_TXT
|
||||
{"道具_忽防%", sizeof("道具_忽防%"), LUA_DATALINE0 + ITEM_NEGLECTGUARD},
|
||||
#endif
|
||||
{"道具_毒耐%", sizeof("道具_毒耐%"), LUA_DATALINE0 + ITEM_POISON},
|
||||
{"道具_麻耐%", sizeof("道具_麻耐%"), LUA_DATALINE0 + ITEM_PARALYSIS},
|
||||
{"道具_睡耐%", sizeof("道具_睡耐%"), LUA_DATALINE0 + ITEM_SLEEP},
|
||||
{"道具_石耐%", sizeof("道具_石耐%"), LUA_DATALINE0 + ITEM_STONE},
|
||||
{"道具_酒耐%", sizeof("道具_酒耐%"), LUA_DATALINE0 + ITEM_DRUNK},
|
||||
{"道具_混耐%", sizeof("道具_混耐%"), LUA_DATALINE0 + ITEM_CONFUSION},
|
||||
{"道具_附一击%", sizeof("道具_附一击%"), LUA_DATALINE0 + ITEM_CRITICAL},
|
||||
{"道具_动作%", sizeof("道具_动作%"), LUA_DATALINE0 + ITEM_USEACTION},
|
||||
{"道具_登消%", sizeof("道具_登消%"), LUA_DATALINE0 + ITEM_DROPATLOGOUT},
|
||||
{"道具_丢消%", sizeof("道具_丢消%"), LUA_DATALINE0 + ITEM_VANISHATDROP},
|
||||
{"道具_档路%", sizeof("道具_档路%"), LUA_DATALINE0 + ITEM_ISOVERED},
|
||||
{"道具_邮寄%", sizeof("道具_邮寄%"), LUA_DATALINE0 + ITEM_CANPETMAIL},
|
||||
{"道具_从合成%", sizeof("道具_从合成%"), LUA_DATALINE0 + ITEM_CANMERGEFROM},
|
||||
{"道具_合成到%", sizeof("道具_合成到%"), LUA_DATALINE0 + ITEM_CANMERGETO},
|
||||
{"道具_份量0%", sizeof("道具_份量0%"), LUA_DATALINE0 + ITEM_INGVALUE0},
|
||||
{"道具_份量1%", sizeof("道具_份量1%"), LUA_DATALINE0 + ITEM_INGVALUE1},
|
||||
{"道具_份量2%", sizeof("道具_份量2%"), LUA_DATALINE0 + ITEM_INGVALUE2},
|
||||
{"道具_份量3%", sizeof("道具_份量3%"), LUA_DATALINE0 + ITEM_INGVALUE3},
|
||||
{"道具_份量4%", sizeof("道具_份量4%"), LUA_DATALINE0 + ITEM_INGVALUE4},
|
||||
{"道具_丢时%", sizeof("道具_丢时%"), LUA_DATALINE0 + ITEM_PUTTIME},
|
||||
{"道具_LL%", sizeof("道具_LL%"), LUA_DATALINE0 + ITEM_LEAKLEVEL},
|
||||
{"道具_曾合%", sizeof("道具_曾合%"), LUA_DATALINE0 + ITEM_MERGEFLG},
|
||||
{"道具_损等%", sizeof("道具_损等%"), LUA_DATALINE0 + ITEM_CRUSHLEVEL},
|
||||
{"道具_限时%", sizeof("道具_限时%"), LUA_DATALINE0 + ITEM_TIME},
|
||||
{"道具_VAR1%", sizeof("道具_VAR1%"), LUA_DATALINE0 + ITEM_VAR1},
|
||||
{"道具_VAR2%", sizeof("道具_VAR2%"), LUA_DATALINE0 + ITEM_VAR2},
|
||||
{"道具_VAR3%", sizeof("道具_VAR3%"), LUA_DATALINE0 + ITEM_VAR3},
|
||||
{"道具_VAR4%", sizeof("道具_VAR4%"), LUA_DATALINE0 + ITEM_VAR4},
|
||||
|
||||
{"道具_物索%", sizeof("道具_物索%"), LUA_DATALINE2 + ITEM_WORKOBJINDEX},
|
||||
{"道具_索引%", sizeof("道具_索引%"), LUA_DATALINE2 + ITEM_WORKCHARAINDEX},
|
||||
#ifdef _ITEM_TIME_LIMIT
|
||||
{"道具_倒时%", sizeof("道具_倒时%"), LUA_DATALINE2 + ITEM_WORKTIMELIMIT},
|
||||
#endif
|
||||
|
||||
{"道具_原名%", sizeof("道具_原名%"), LUA_DATALINE1 + ITEM_NAME},
|
||||
{"道具_名%", sizeof("道具_名%"), LUA_DATALINE1 + ITEM_SECRETNAME},
|
||||
{"道具_说明%", sizeof("道具_说明%"), LUA_DATALINE1 + ITEM_EFFECTSTRING},
|
||||
{"道具_参%", sizeof("道具_参%"), LUA_DATALINE1 + ITEM_ARGUMENT},
|
||||
{"道具_帐%", sizeof("道具_帐%"), LUA_DATALINE1 + ITEM_CDKEY},
|
||||
{"道具_爱帐%", sizeof("道具_爱帐%"), LUA_DATALINE1 + ITEM_FORUSERCDKEY},
|
||||
{"道具_份0%", sizeof("道具_份0%"), LUA_DATALINE1 + ITEM_INGNAME0},
|
||||
{"道具_份1%", sizeof("道具_份1%"), LUA_DATALINE1 + ITEM_INGNAME1},
|
||||
{"道具_份2%", sizeof("道具_份2%"), LUA_DATALINE1 + ITEM_INGNAME2},
|
||||
{"道具_份3%", sizeof("道具_份3%"), LUA_DATALINE1 + ITEM_INGNAME3},
|
||||
{"道具_份4%", sizeof("道具_份4%"), LUA_DATALINE1 + ITEM_INGNAME4},
|
||||
|
||||
{"道栏_头位%", sizeof("道栏_头位%"), CHAR_HEAD},
|
||||
{"道栏_身位%", sizeof("道栏_身位%"), CHAR_BODY},
|
||||
{"道栏_右手%", sizeof("道栏_右手%"), CHAR_ARM},
|
||||
{"道栏_饰1%", sizeof("道栏_饰1%"), CHAR_DECORATION1},
|
||||
{"道栏_饰2%", sizeof("道栏_饰2%"), CHAR_DECORATION2},
|
||||
#ifdef _ITEM_EQUITSPACE
|
||||
{"道栏_左手%", sizeof("道栏_左手%"), CHAR_EQSHIELD},
|
||||
{"道栏_腰位%", sizeof("道栏_腰位%"), CHAR_EQBELT},
|
||||
{"道栏_脚位%", sizeof("道栏_脚位%"), CHAR_EQSHOES},
|
||||
#endif
|
||||
#ifdef _EQUIT_NEWGLOVE
|
||||
{"道栏_手套%", sizeof("道栏_手套%"), CHAR_EQGLOVE},
|
||||
#endif
|
||||
{"道栏_1%", sizeof("道栏_1%"), CHAR_STARTITEMARRAY + 0},
|
||||
{"道栏_2%", sizeof("道栏_2%"), CHAR_STARTITEMARRAY + 1},
|
||||
{"道栏_3%", sizeof("道栏_3%"), CHAR_STARTITEMARRAY + 2},
|
||||
{"道栏_4%", sizeof("道栏_4%"), CHAR_STARTITEMARRAY + 3},
|
||||
{"道栏_5%", sizeof("道栏_5%"), CHAR_STARTITEMARRAY + 4},
|
||||
{"道栏_6%", sizeof("道栏_6%"), CHAR_STARTITEMARRAY + 5},
|
||||
{"道栏_7%", sizeof("道栏_7%"), CHAR_STARTITEMARRAY + 6},
|
||||
{"道栏_8%", sizeof("道栏_8%"), CHAR_STARTITEMARRAY + 7},
|
||||
{"道栏_9%", sizeof("道栏_9%"), CHAR_STARTITEMARRAY + 8},
|
||||
{"道栏_10%", sizeof("道栏_10%"), CHAR_STARTITEMARRAY + 9},
|
||||
{"道栏_11%", sizeof("道栏_11%"), CHAR_STARTITEMARRAY + 10},
|
||||
{"道栏_12%", sizeof("道栏_12%"), CHAR_STARTITEMARRAY + 11},
|
||||
{"道栏_13%", sizeof("道栏_13%"), CHAR_STARTITEMARRAY + 12},
|
||||
{"道栏_14%", sizeof("道栏_14%"), CHAR_STARTITEMARRAY + 13},
|
||||
{"道栏_15%", sizeof("道栏_15%"), CHAR_STARTITEMARRAY + 14},
|
||||
|
||||
{"宠栏_1%", sizeof("宠栏_1%"), 0},
|
||||
{"宠栏_2%", sizeof("宠栏_2%"), 1},
|
||||
{"宠栏_3%", sizeof("宠栏_3%"), 2},
|
||||
{"宠栏_4%", sizeof("宠栏_4%"), 3},
|
||||
{"宠栏_5%", sizeof("宠栏_5%"), 4},
|
||||
|
||||
{"队员_1%", sizeof("队员_1%"), 1},
|
||||
{"队员_2%", sizeof("队员_2%"), 2},
|
||||
{"队员_3%", sizeof("队员_3%"), 3},
|
||||
{"队员_4%", sizeof("队员_4%"), 4},
|
||||
|
||||
{"IT_爪%", sizeof("IT_爪%"), ITEM_FIST},
|
||||
{"IT_斧头%", sizeof("IT_斧头%"), ITEM_AXE},
|
||||
{"IT_棍棒%", sizeof("IT_棍棒%"), ITEM_CLUB},
|
||||
{"IT_枪%", sizeof("IT_枪%"), ITEM_SPEAR},
|
||||
{"IT_弓%", sizeof("IT_弓%"), ITEM_BOW},
|
||||
{"IT_SHIELD%", sizeof("IT_SHIELD%"), ITEM_SHIELD},
|
||||
{"IT_HELM%", sizeof("IT_HELM%"), ITEM_HELM},
|
||||
{"IT_ARMOUR%", sizeof("IT_ARMOUR%"), ITEM_ARMOUR},
|
||||
{"IT_手环%", sizeof("IT_手环%"), ITEM_BRACELET},
|
||||
{"IT_乐器%", sizeof("IT_乐器%"), ITEM_MUSIC},
|
||||
{"IT_项链%", sizeof("IT_项链%"), ITEM_NECKLACE},
|
||||
{"IT_环%", sizeof("IT_环%"), ITEM_RING},
|
||||
{"IT_BELT%", sizeof("IT_BELT%"), ITEM_BELT},
|
||||
{"IT_耳环%", sizeof("IT_耳环%"), ITEM_EARRING},
|
||||
{"IT_鼻环%", sizeof("IT_鼻环%"), ITEM_NOSERING},
|
||||
{"IT_护身符%", sizeof("IT_护身符%"), ITEM_AMULET},
|
||||
{"IT_其他%", sizeof("IT_其他%"), ITEM_OTHER},
|
||||
{"IT_回旋标%", sizeof("IT_回旋标%"), ITEM_BOOMERANG},
|
||||
{"IT_投掷斧%", sizeof("IT_投掷斧%"), ITEM_BOUNDTHROW},
|
||||
{"IT_投掷石%", sizeof("IT_投掷石%"), ITEM_BREAKTHROW},
|
||||
{"IT_DISH%", sizeof("IT_DISH%"), ITEM_DISH},
|
||||
#ifdef _ITEM_INSLAY
|
||||
{"IT_金属%", sizeof("IT_金属%"), ITEM_METAL},
|
||||
{"IT_首饰%", sizeof("IT_首饰%"), ITEM_JEWEL},
|
||||
#endif
|
||||
#ifdef _ITEM_CHECKWARES
|
||||
{"IT_货物%", sizeof("IT_货物%"), ITEM_WARES},
|
||||
#endif
|
||||
#ifdef _ITEM_EQUITSPACE
|
||||
{"IT_腰带%", sizeof("IT_腰带%"), ITEM_WBELT},
|
||||
{"IT_盾牌%", sizeof("IT_盾牌%"), ITEM_WSHIELD},
|
||||
{"IT_鞋子%", sizeof("IT_鞋子%"), ITEM_WSHOES},
|
||||
#endif
|
||||
#ifdef _EQUIT_NEWGLOVE
|
||||
{"IT_手套%", sizeof("IT_手套%"), ITEM_WGLOVE},
|
||||
#endif
|
||||
#ifdef _JZ_PETEQU
|
||||
{"IT_宠头套%", sizeof("IT_宠头套%"), ITEM_PET_HEAD},
|
||||
{"IT_宠翅膀%", sizeof("IT_宠翅膀%"), ITEM_PET_WING},
|
||||
{"IT_宠牙套%", sizeof("IT_宠牙套%"), ITEM_PET_TOOTH},
|
||||
{"IT_宠胸甲%", sizeof("IT_宠胸甲%"), ITEM_PET_BREAST},
|
||||
{"IT_宠背甲%", sizeof("IT_宠背甲%"), ITEM_PET_BACK},
|
||||
{"IT_宠爪套%", sizeof("IT_宠爪套%"), ITEM_PET_CLAW},
|
||||
{"IT_宠护脚2%", sizeof("IT_宠护脚2%"), ITEM_PET_FEET},
|
||||
{"IT_宠护脚4%", sizeof("IT_宠护脚4%"), ITEM_PET_FEET4},
|
||||
{"IT_宠鳍套%", sizeof("IT_宠鳍套%"), ITEM_PET_FIN},
|
||||
#endif
|
||||
|
||||
{"家族_没%", sizeof("家族_没%"), FMMEMBER_NONE},
|
||||
{"家族_一般%", sizeof("家族_一般%"), FMMEMBER_MEMBER},
|
||||
{"家族_申请%", sizeof("家族_申请%"), FMMEMBER_APPLY},
|
||||
{"家族_族长%", sizeof("家族_族长%"), FMMEMBER_LEADER},
|
||||
{"家族_长老%", sizeof("家族_长老%"), FMMEMBER_ELDER},
|
||||
//{"家族_祭司", sizeof("家族_祭司"), FMMEMBER_INVITE},
|
||||
//{"家族_财务", sizeof("家族_财务"), FMMEMBER_BAILEE},
|
||||
//{"家族_副族", sizeof("家族_副族"), FMMEMBER_VICELEADER},
|
||||
|
||||
{"战类_普%", sizeof("战类_普%"), BATTLE_TYPE_NONE},
|
||||
{"战类_人怪%", sizeof("战类_人怪%"), BATTLE_TYPE_P_vs_E},
|
||||
{"战类_人人%", sizeof("战类_人人%"), BATTLE_TYPE_P_vs_P},
|
||||
{"战类_怪怪%", sizeof("战类_怪怪%"), BATTLE_TYPE_E_vs_E},
|
||||
{"战类_观%", sizeof("战类_观%"), BATTLE_TYPE_WATCH},
|
||||
{"战类_DP%", sizeof("战类_DP%"), BATTLE_TYPE_DP_BATTLE},
|
||||
{"战类_BOSS%", sizeof("战类_BOSS%"), BATTLE_TYPE_BOSS_BATTLE},
|
||||
|
||||
{"战斗_无%", sizeof("战斗_无%"), BATTLE_MODE_NONE},
|
||||
{"战斗_初%", sizeof("战斗_初%"), BATTLE_MODE_INIT},
|
||||
{"战斗_中%", sizeof("战斗_中%"), BATTLE_MODE_BATTLE},
|
||||
{"战斗_结束%", sizeof("战斗_结束%"), BATTLE_MODE_FINISH},
|
||||
{"战斗_结束中%", sizeof("战斗_结束中%"), BATTLE_MODE_STOP},
|
||||
{"战斗_观初%", sizeof("战斗_观初%"), BATTLE_MODE_WATCHBC},
|
||||
{"战斗_观1%", sizeof("战斗_观1%"), BATTLE_MODE_WATCHPRE},
|
||||
{"战斗_观2%", sizeof("战斗_观2%"), BATTLE_MODE_WATCHWAIT},
|
||||
{"战斗_观3%", sizeof("战斗_观3%"), BATTLE_MODE_WATCHMOVIE},
|
||||
{"战斗_观4%", sizeof("战斗_观4%"), BATTLE_MODE_WATCHAFTER},
|
||||
|
||||
{"女孩%", sizeof("女孩%"), CHAR_IMAGETYPE_GIRL},
|
||||
{"男孩%", sizeof("男孩%"), CHAR_IMAGETYPE_BOY},
|
||||
{"男童%", sizeof("男童%"), CHAR_IMAGETYPE_CHILDBOY},
|
||||
{"女童%", sizeof("女童%"), CHAR_IMAGETYPE_CHILDGIRL},
|
||||
{"男人%", sizeof("男人%"), CHAR_IMAGETYPE_MAN},
|
||||
{"妇女%", sizeof("妇女%"), CHAR_IMAGETYPE_WOMAN},
|
||||
{"老人%", sizeof("老人%"), CHAR_IMAGETYPE_OLDMAN},
|
||||
{"狗%", sizeof("狗%"), CHAR_IMAGETYPE_DOG},
|
||||
|
||||
{"对像_玩%", sizeof("对像_玩%"), CHAR_TYPEPLAYER},
|
||||
{"对像_怪%", sizeof("对像_怪%"), CHAR_TYPEENEMY},
|
||||
{"对像_宠%", sizeof("对像_宠%"), CHAR_TYPEPET},
|
||||
{"对像_NPC1%", sizeof("对像_NPC1%"), CHAR_TYPEDOOR},
|
||||
{"对像_NPC2%", sizeof("对像_NPC2%"), CHAR_TYPEBOX},
|
||||
{"对像_NPC3%", sizeof("对像_NPC3%"), CHAR_TYPEMSG},
|
||||
{"对像_NPC4%", sizeof("对像_NPC4%"), CHAR_TYPEWARP},
|
||||
{"对像_NPC5%", sizeof("对像_NPC5%"), CHAR_TYPESHOP},
|
||||
{"对像_NPC6%", sizeof("对像_NPC6%"), CHAR_TYPEHEALER},
|
||||
{"对像_NPC7%", sizeof("对像_NPC7%"), CHAR_TYPEOLDMAN},
|
||||
{"对像_NPC8%", sizeof("对像_NPC8%"), CHAR_TYPEROOMADMIN},
|
||||
{"对像_NPC9%", sizeof("对像_NPC9%"), CHAR_TYPETOWNPEOPLE},
|
||||
{"对像_NPC10%", sizeof("对像_NPC10%"), CHAR_TYPEDENGON},
|
||||
{"对像_NPC11%", sizeof("对像_NPC11%"), CHAR_TYPEADM},
|
||||
{"对像_NPC12%", sizeof("对像_NPC12%"), CHAR_TYPETEMPLE},
|
||||
{"对像_NPC13%", sizeof("对像_NPC13%"), CHAR_TYPESTORYTELLER},
|
||||
{"对像_NPC14%", sizeof("对像_NPC14%"), CHAR_TYPERANKING},
|
||||
{"对像_NPC15%", sizeof("对像_NPC15%"), CHAR_TYPEOTHERNPC},
|
||||
{"对像_NPC16%", sizeof("对像_NPC16%"), CHAR_TYPEPRINTPASSMAN},
|
||||
{"对像_NPC17%", sizeof("对像_NPC17%"), CHAR_TYPENPCENEMY},
|
||||
{"对像_NPC18%", sizeof("对像_NPC18%"), CHAR_TYPEACTION},
|
||||
{"对像_NPC19%", sizeof("对像_NPC19%"), CHAR_TYPEWINDOWMAN},
|
||||
{"对像_NPC20%", sizeof("对像_NPC20%"), CHAR_TYPESAVEPOINT},
|
||||
{"对像_NPC21%", sizeof("对像_NPC21%"), CHAR_TYPEWINDOWHEALER},
|
||||
{"对像_NPC22%", sizeof("对像_NPC22%"), CHAR_TYPEITEMSHOP},
|
||||
{"对像_NPC23%", sizeof("对像_NPC23%"), CHAR_TYPESTONESHOP},
|
||||
{"对像_NPC24%", sizeof("对像_NPC24%"), CHAR_TYPEDUELRANKING},
|
||||
{"对像_NPC25%", sizeof("对像_NPC25%"), CHAR_TYPEWARPMAN},
|
||||
{"对像_NPC26%", sizeof("对像_NPC26%"), CHAR_TYPEEVENT},
|
||||
{"对像_NPC27%", sizeof("对像_NPC27%"), CHAR_TYPEMIC},
|
||||
{"对像_NPC28%", sizeof("对像_NPC28%"), CHAR_TYPELUCKYMAN},
|
||||
{"对像_NPC29%", sizeof("对像_NPC29%"), CHAR_TYPEBUS},
|
||||
{"对像_NPC30%", sizeof("对像_NPC30%"), CHAR_TYPECHARM},
|
||||
{"对像_NPC31%", sizeof("对像_NPC31%"), CHAR_TYPECHECKMAN},
|
||||
{"对像_NPC32%", sizeof("对像_NPC32%"), CHAR_TYPEJANKEN},
|
||||
{"对像_NPC33%", sizeof("对像_NPC33%"), CHAR_TYPETRANSMIGRATION},
|
||||
{"对像_NPC34%", sizeof("对像_NPC34%"), CHAR_TYPEFMWARPMAN},
|
||||
{"对像_NPC35%", sizeof("对像_NPC35%"), CHAR_TYPEFMSCHEDULEMAN},
|
||||
{"对像_NPC36%", sizeof("对像_NPC36%"), CHAR_TYPEMANORSCHEDULEMAN},
|
||||
#ifdef _SERVICE
|
||||
{"对像_NPC37%", sizeof("对像_NPC37%"), CHAR_TYPESTONESERVICEMAN},
|
||||
#endif
|
||||
#ifdef _GAMBLE_BANK
|
||||
{"对像_NPC38%", sizeof("对像_NPC38%"), CHAR_GAMBLEBANK},
|
||||
#endif
|
||||
#ifdef _NEW_WARPMAN
|
||||
{"对像_NPC39%", sizeof("对像_NPC39%"), CHAR_NEWNPCMAN},
|
||||
#endif
|
||||
#ifdef _MARKET_TRADE
|
||||
{"对像_NPC40%", sizeof("对像_NPC40%"), CHAR_MAPTRADEMAN},
|
||||
#endif
|
||||
#ifdef _GAMBLE_ROULETTE
|
||||
{"对像_NPC41%", sizeof("对像_NPC41%"), CHAR_GAMBLEROULETTE},
|
||||
{"对像_NPC42%", sizeof("对像_NPC42%"), CHAR_GAMBLEMASTER},
|
||||
#endif
|
||||
#ifdef _TRANSER_MAN
|
||||
{"对像_NPC43%", sizeof("对像_NPC43%"), CHAR_TRANSERMANS},
|
||||
#endif
|
||||
#ifdef _JZ_NEW_ADDMEMBERPOINT
|
||||
{"对像_NPC44%", sizeof("对像_NPC44%"), CHAR_MEMBERMANS},
|
||||
#endif
|
||||
#ifdef _NPC_SELLSTH
|
||||
{"对像_NPC45%", sizeof("对像_NPC45%"), CHAR_SELLSTHMAN},
|
||||
#endif
|
||||
#ifdef _NPC_MAKEPAIR
|
||||
{"对像_NPC46%", sizeof("对像_NPC46%"), CHAR_MAKEPAIR},
|
||||
#endif
|
||||
#ifdef _NPC_FUSION
|
||||
{"对像_NPC47%", sizeof("对像_NPC47%"), CHAR_PETFUSIONMAN},
|
||||
#endif
|
||||
#ifdef _PAUCTION_MAN
|
||||
{"对像_NPC48%", sizeof("对像_NPC48%"), CHAR_PAUCTIONMAN},
|
||||
#endif
|
||||
#ifdef _ITEM_NPCCHANGE
|
||||
{"对像_NPC49%", sizeof("对像_NPC49%"), CHAR_ITEMCHANGENPC},
|
||||
#endif
|
||||
#ifdef _CFREE_petskill
|
||||
{"对像_NPC50%", sizeof("对像_NPC50%"), CHAR_FREESKILLSHOP},
|
||||
#endif
|
||||
#ifdef _PETRACE
|
||||
{"对像_NPC51%", sizeof("对像_NPC51%"), CHAR_PETRACEMASTER},
|
||||
{"对像_NPC52%", sizeof("对像_NPC52%"), CHAR_PETRACEPET},
|
||||
#endif
|
||||
#ifdef _AUCTIONEER
|
||||
{"对像_NPC53%", sizeof("对像_NPC53%"), CHAR_TYPEAUCTIONEER},
|
||||
#endif
|
||||
#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC
|
||||
{"对像_NPC54%", sizeof("对像_NPC54%"), CHAR_TYPEALLDOMAN},
|
||||
#endif
|
||||
{"对像_NPC55%", sizeof("对像_NPC55%"), CHAR_TYPEPETMAKER},
|
||||
#ifdef _NPC_WELFARE
|
||||
{"对像_NPC56%", sizeof("对像_NPC56%"), CHAR_TYPEWELFARE},
|
||||
#endif
|
||||
#ifdef _NPC_VERYWELFARE
|
||||
{"对像_NPC57%", sizeof("对像_NPC57%"), CHAR_TYPEVERYWELFARE},
|
||||
#endif
|
||||
#ifdef _NPC_WELFARE_2 // WON ADD 职业NPC-2
|
||||
{"对像_NPC58%", sizeof("对像_NPC58%"), CHAR_TYPEWELFARE2},
|
||||
#endif
|
||||
#ifdef _RACEMAN
|
||||
{"对像_NPC59%", sizeof("对像_NPC59%"), CHAR_RACEMAN},
|
||||
#endif
|
||||
|
||||
{"物件_没%", sizeof("物件_没%"), OBJTYPE_NOUSE},
|
||||
{"物件_人%", sizeof("物件_人%"), OBJTYPE_CHARA},
|
||||
{"物件_道%", sizeof("物件_道%"), OBJTYPE_ITEM},
|
||||
{"物件_币%", sizeof("物件_币%"), OBJTYPE_GOLD},
|
||||
#ifdef _NPCSERVER_NEW
|
||||
{"物件_NPC%", sizeof("物件_NPC%"), OBJTYPE_NPCSCHARA},
|
||||
#endif
|
||||
#ifdef _MAP_WARPPOINT
|
||||
{"物件_传%", sizeof("物件_传%"), OBJTYPE_WARPPOINT},
|
||||
#endif
|
||||
|
||||
{"按钮_没%", sizeof("按钮_没%"), WINDOW_BUTTONTYPE_NONE},
|
||||
{"按钮_确定%", sizeof("按钮_确定%"), WINDOW_BUTTONTYPE_OK},
|
||||
{"按钮_关闭%", sizeof("按钮_关闭%"), WINDOW_BUTTONTYPE_CANCEL},
|
||||
{"按钮_是%", sizeof("按钮_是%"), WINDOW_BUTTONTYPE_YES},
|
||||
{"按钮_否%", sizeof("按钮_否%"), WINDOW_BUTTONTYPE_NO},
|
||||
{"按钮_上一页%", sizeof("按钮_上一页%"), WINDOW_BUTTONTYPE_PREV},
|
||||
{"按钮_下一页%", sizeof("按钮_下一页%"), WINDOW_BUTTONTYPE_NEXT},
|
||||
|
||||
{"组队_没队%", sizeof("组队_没队%"), CHAR_PARTY_NONE},
|
||||
{"组队_队长%", sizeof("组队_队长%"), CHAR_PARTY_LEADER},
|
||||
{"组队_队员%", sizeof("组队_队员%"), CHAR_PARTY_CLIENT},
|
||||
|
||||
{"左上%", sizeof("左上%"), 0},
|
||||
{"上%", sizeof("上%"), 1},
|
||||
{"右上%", sizeof("右上%"), 2},
|
||||
{"右%", sizeof("右%"), 3},
|
||||
{"右下%", sizeof("右下%"), 4},
|
||||
{"下%", sizeof("下%"), 5},
|
||||
{"左下%", sizeof("左下%"), 6},
|
||||
{"左%", sizeof("左%"), 7},
|
||||
|
||||
{"白色%", sizeof("白色%"), CHAR_COLORWHITE},
|
||||
{"青色%", sizeof("青色%"), CHAR_COLORCYAN},
|
||||
{"紫色%", sizeof("紫色%"), CHAR_COLORPURPLE},
|
||||
{"蓝色%", sizeof("蓝色%"), CHAR_COLORBLUE},
|
||||
{"黄色%", sizeof("黄色%"), CHAR_COLORYELLOW},
|
||||
{"绿色%", sizeof("绿色%"), CHAR_COLORGREEN},
|
||||
{"红色%", sizeof("红色%"), CHAR_COLORRED},
|
||||
{"灰色%", sizeof("灰色%"), CHAR_COLORGRAY},
|
||||
{"深蓝色%", sizeof("深蓝色%"), CHAR_COLORBLUE2},
|
||||
{"深绿色%", sizeof("深绿色%"), CHAR_COLORGREEN2},
|
||||
{"黑色%", sizeof("黑色%"), CHAR_COLORBLACK},
|
||||
|
||||
{"队更新_OBJ%", sizeof("队更新_OBJ%"), CHAR_N_STRING_OBJINDEX},
|
||||
{"队更新_LV%", sizeof("队更新_LV%"), CHAR_N_STRING_LV},
|
||||
{"队更新_MAXHP%", sizeof("队更新_MAXHP%"), CHAR_N_STRING_MAXHP},
|
||||
{"队更新_HP%", sizeof("队更新_HP%"), CHAR_N_STRING_HP},
|
||||
{"队更新_MP%", sizeof("队更新_MP%"), CHAR_N_STRING_MP},
|
||||
{"队更新_名字%", sizeof("队更新_名字%"), CHAR_N_STRING_NAME},
|
||||
|
||||
{"更新3_HP%", sizeof("更新3_HP%"), CHAR_P_STRING_HP},
|
||||
{"更新3_MAXHP%", sizeof("更新3_MAXHP%"), CHAR_P_STRING_MAXHP},
|
||||
{"更新3_MP%", sizeof("更新3_MP%"), CHAR_P_STRING_MP},
|
||||
{"更新3_MAXMP%", sizeof("更新3_MAXMP%"), CHAR_P_STRING_MAXMP},
|
||||
{"更新3_体%", sizeof("更新3_体%"), CHAR_P_STRING_VITAL},
|
||||
{"更新3_腕%", sizeof("更新3_腕%"), CHAR_P_STRING_STR},
|
||||
{"更新3_耐%", sizeof("更新3_耐%"), CHAR_P_STRING_TOUGH},
|
||||
{"更新3_速%", sizeof("更新3_速%"), CHAR_P_STRING_DEX},
|
||||
{"更新3_经验%", sizeof("更新3_经验%"), CHAR_P_STRING_EXP},
|
||||
{"更新3_下一级经验%", sizeof("更新3_下一级经验%"), CHAR_P_STRING_NEXTEXP},
|
||||
{"更新3_等级%", sizeof("更新3_等级%"), CHAR_P_STRING_LV},
|
||||
{"更新3_攻击%", sizeof("更新3_攻击%"), CHAR_P_STRING_ATK},
|
||||
{"更新3_防御%", sizeof("更新3_防御%"), CHAR_P_STRING_DEF},
|
||||
{"更新3_敏捷%", sizeof("更新3_敏捷%"), CHAR_P_STRING_QUICK},
|
||||
{"更新3_魅力%", sizeof("更新3_魅力%"), CHAR_P_STRING_CHARM},
|
||||
{"更新3_运气%", sizeof("更新3_运气%"), CHAR_P_STRING_LUCK},
|
||||
{"更新3_地属性%", sizeof("更新3_地属性%"), CHAR_P_STRING_EARTH},
|
||||
{"更新3_水属性%", sizeof("更新3_水属性%"), CHAR_P_STRING_WATER},
|
||||
{"更新3_火属性%", sizeof("更新3_火属性%"), CHAR_P_STRING_FIRE},
|
||||
{"更新3_风属性%", sizeof("更新3_风属性%"), CHAR_P_STRING_WIND},
|
||||
{"更新3_石币%", sizeof("更新3_石币%"), CHAR_P_STRING_GOLD},
|
||||
{"更新3_称号%", sizeof("更新3_称号%"), CHAR_P_STRING_TITLE},
|
||||
{"更新3_DP%", sizeof("更新3_DP%"), CHAR_P_STRING_DUELPOINT},
|
||||
{"更新3_转数%", sizeof("更新3_转数%"), CHAR_P_STRING_TRANSMIGRATION},
|
||||
{"更新3_名称%", sizeof("更新3_名称%"), CHAR_P_STRING_NAME},
|
||||
{"更新3_昵称%", sizeof("更新3_昵称%"), CHAR_P_STRING_OWNTITLE},
|
||||
{"更新3_骑宠%", sizeof("更新3_骑宠%"), CHAR_P_STRING_RIDEPET},
|
||||
{"更新3_学骑等级%", sizeof("更新3_学骑等级%"), CHAR_P_STRING_LEARNRIDE},
|
||||
{"更新3_形象%", sizeof("更新3_形象%"), CHAR_P_STRING_BASEBASEIMAGENUMBER},
|
||||
{"更新3_天行者模式%", sizeof("更新3_天行者模式%"), CHAR_P_STRING_SKYWALKER},
|
||||
{"更新3_调试模式%", sizeof("更新3_调试模式%"), CHAR_P_STRING_DEBUGMODE},
|
||||
|
||||
{NULL, 0, 0},
|
||||
};
|
||||
|
244
des.c
Normal file
244
des.c
Normal file
@ -0,0 +1,244 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
Provided by 王俊川, Northeastern University (www.neu.edu.cn)
|
||||
Email: blackdrn@sohu.com
|
||||
This product is free for use.
|
||||
*/
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <memory.h>
|
||||
#include "des.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// initial permutation IP
|
||||
const static char IP_Table[64] = {
|
||||
58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4,
|
||||
62, 54, 46, 38, 30, 22, 14, 6, 64, 56, 48, 40, 32, 24, 16, 8,
|
||||
57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3,
|
||||
61, 53, 45, 37, 29, 21, 13, 5, 63, 55, 47, 39, 31, 23, 15, 7
|
||||
};
|
||||
// final permutation IP^-1
|
||||
const static char IPR_Table[64] = {
|
||||
40, 8, 48, 16, 56, 24, 64, 32, 39, 7, 47, 15, 55, 23, 63, 31,
|
||||
38, 6, 46, 14, 54, 22, 62, 30, 37, 5, 45, 13, 53, 21, 61, 29,
|
||||
36, 4, 44, 12, 52, 20, 60, 28, 35, 3, 43, 11, 51, 19, 59, 27,
|
||||
34, 2, 42, 10, 50, 18, 58, 26, 33, 1, 41, 9, 49, 17, 57, 25
|
||||
};
|
||||
// expansion operation matrix
|
||||
static const char E_Table[48] = {
|
||||
32, 1, 2, 3, 4, 5, 4, 5, 6, 7, 8, 9,
|
||||
8, 9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 17,
|
||||
16, 17, 18, 19, 20, 21, 20, 21, 22, 23, 24, 25,
|
||||
24, 25, 26, 27, 28, 29, 28, 29, 30, 31, 32, 1
|
||||
};
|
||||
// 32-bit permutation function P used on the output of the S-boxes
|
||||
const static char P_Table[32] = {
|
||||
16, 7, 20, 21, 29, 12, 28, 17, 1, 15, 23, 26, 5, 18, 31, 10,
|
||||
2, 8, 24, 14, 32, 27, 3, 9, 19, 13, 30, 6, 22, 11, 4, 25
|
||||
};
|
||||
// permuted choice table (key)
|
||||
const static char PC1_Table[56] = {
|
||||
57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18,
|
||||
10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36,
|
||||
63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22,
|
||||
14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4
|
||||
};
|
||||
// permuted choice key (table)
|
||||
const static char PC2_Table[48] = {
|
||||
14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10,
|
||||
23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2,
|
||||
41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48,
|
||||
44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32
|
||||
};
|
||||
// number left rotations of pc1
|
||||
const static char LOOP_Table[16] = {
|
||||
1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1
|
||||
};
|
||||
// The (in)famous S-boxes
|
||||
const static char S_Box[8][4][16] = {
|
||||
// S1
|
||||
14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7,
|
||||
0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8,
|
||||
4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0,
|
||||
15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13,
|
||||
// S2
|
||||
15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10,
|
||||
3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5,
|
||||
0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15,
|
||||
13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9,
|
||||
// S3
|
||||
10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8,
|
||||
13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1,
|
||||
13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7,
|
||||
1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12,
|
||||
// S4
|
||||
7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15,
|
||||
13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9,
|
||||
10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4,
|
||||
3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14,
|
||||
// S5
|
||||
2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9,
|
||||
14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6,
|
||||
4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14,
|
||||
11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3,
|
||||
// S6
|
||||
12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11,
|
||||
10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8,
|
||||
9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6,
|
||||
4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13,
|
||||
// S7
|
||||
4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1,
|
||||
13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6,
|
||||
1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2,
|
||||
6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12,
|
||||
// S8
|
||||
13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7,
|
||||
1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2,
|
||||
7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8,
|
||||
2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef bool (*PSubKey)[16][48];
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static void DES(char Out[8], char In[8], const PSubKey pSubKey, bool Type);//标准DES加/解密
|
||||
static void SetKey(const char* Key, int len);// 设置密钥
|
||||
static void SetSubKey(PSubKey pSubKey, const char Key[8]);// 设置子密钥
|
||||
static void F_func(bool In[32], const bool Ki[48]);// f 函数
|
||||
static void S_func(bool Out[32], const bool In[48]);// S 盒代替
|
||||
static void Transform(bool *Out, bool *In, const char *Table, int len);// 变换
|
||||
static void Xor(bool *InA, const bool *InB, int len);// 异或
|
||||
static void RotateL(bool *In, int len, int loop);// 循环左移
|
||||
static void ByteToBit(bool *Out, const char *In, int bits);// 字节组转换成位组
|
||||
static void BitToByte(char *Out, const bool *In, int bits);// 位组转换成字节组
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static bool SubKey[2][16][48];// 16圈子密钥
|
||||
static bool Is3DES;// 3次DES标志
|
||||
static char Tmp[256], deskey[16];
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Code starts from Line 130
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool Des_Go(char *Out, char *In, long datalen, const char *Key, int keylen, bool Type)
|
||||
{
|
||||
if( !( Out && In && Key && (datalen=(datalen+7)&0xfffffff8) ) )
|
||||
return false;
|
||||
SetKey(Key, keylen);
|
||||
if( !Is3DES ) { // 1次DES
|
||||
long i,j;
|
||||
for(i=0,j=datalen>>3; i<j; ++i,Out+=8,In+=8)
|
||||
DES(Out, In, &SubKey[0], Type);
|
||||
} else{ // 3次DES 加密:加(key0)-解(key1)-加(key0) 解密::解(key0)-加(key1)-解(key0)
|
||||
long i,j;
|
||||
for(i=0,j=datalen>>3; i<j; ++i,Out+=8,In+=8) {
|
||||
DES(Out, In, &SubKey[0], Type);
|
||||
DES(Out, Out, &SubKey[1], !Type);
|
||||
DES(Out, Out, &SubKey[0], Type);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
void SetKey(const char* Key, int len)
|
||||
{
|
||||
memset(deskey, 0, 16);
|
||||
memcpy(deskey, Key, len>16?16:len);
|
||||
SetSubKey(&SubKey[0], &deskey[0]);
|
||||
Is3DES = len>8 ? (SetSubKey(&SubKey[1], &deskey[8]), true) : false;
|
||||
}
|
||||
void DES(char Out[8], char In[8], const PSubKey pSubKey, bool Type)
|
||||
{
|
||||
static bool M[64], tmp[32], *Li=&M[0], *Ri=&M[32];
|
||||
ByteToBit(M, In, 64);
|
||||
Transform(M, M, IP_Table, 64);
|
||||
if( Type == ENCRYPT ){
|
||||
int i;
|
||||
for(i=0; i<16; ++i) {
|
||||
memcpy(tmp, Ri, 32);
|
||||
F_func(Ri, (*pSubKey)[i]);
|
||||
Xor(Ri, Li, 32);
|
||||
memcpy(Li, tmp, 32);
|
||||
}
|
||||
}else{
|
||||
int i;
|
||||
for(i=15; i>=0; --i) {
|
||||
memcpy(tmp, Li, 32);
|
||||
F_func(Li, (*pSubKey)[i]);
|
||||
Xor(Li, Ri, 32);
|
||||
memcpy(Ri, tmp, 32);
|
||||
}
|
||||
}
|
||||
Transform(M, M, IPR_Table, 64);
|
||||
BitToByte(Out, M, 64);
|
||||
}
|
||||
void SetSubKey(PSubKey pSubKey, const char Key[8])
|
||||
{
|
||||
static bool K[64], *KL=&K[0], *KR=&K[28];
|
||||
ByteToBit(K, Key, 64);
|
||||
Transform(K, K, PC1_Table, 56);
|
||||
int i;
|
||||
for(i=0; i<16; ++i) {
|
||||
RotateL(KL, 28, LOOP_Table[i]);
|
||||
RotateL(KR, 28, LOOP_Table[i]);
|
||||
Transform((*pSubKey)[i], K, PC2_Table, 48);
|
||||
}
|
||||
}
|
||||
void F_func(bool In[32], const bool Ki[48])
|
||||
{
|
||||
static bool MR[48];
|
||||
Transform(MR, In, E_Table, 48);
|
||||
Xor(MR, Ki, 48);
|
||||
S_func(In, MR);
|
||||
Transform(In, In, P_Table, 32);
|
||||
}
|
||||
void S_func(bool Out[32], const bool In[48])
|
||||
{
|
||||
char i,j,k;
|
||||
for(i=0; i<8; ++i,In+=6,Out+=4) {
|
||||
j = (In[0]<<1) + In[5];
|
||||
k = (In[1]<<3) + (In[2]<<2) + (In[3]<<1) + In[4];
|
||||
ByteToBit(Out, &S_Box[i][j][k], 4);
|
||||
}
|
||||
}
|
||||
void Transform(bool *Out, bool *In, const char *Table, int len)
|
||||
{
|
||||
int i;
|
||||
for(i=0; i<len; ++i)
|
||||
Tmp[i] = In[ Table[i]-1 ];
|
||||
memcpy(Out, Tmp, len);
|
||||
}
|
||||
void Xor(bool *InA, const bool *InB, int len)
|
||||
{
|
||||
int i;
|
||||
for(i=0; i<len; ++i)
|
||||
InA[i] ^= InB[i];
|
||||
}
|
||||
void RotateL(bool *In, int len, int loop)
|
||||
{
|
||||
memcpy(Tmp, In, loop);
|
||||
memcpy(In, In+loop, len-loop);
|
||||
memcpy(In+len-loop, Tmp, loop);
|
||||
}
|
||||
void ByteToBit(bool *Out, const char *In, int bits)
|
||||
{
|
||||
int i;
|
||||
for(i=0; i<bits; ++i)
|
||||
Out[i] = (In[i>>3]>>(i&7)) & 1;
|
||||
}
|
||||
void BitToByte(char *Out, const bool *In, int bits)
|
||||
{
|
||||
memset(Out, 0, bits>>3);
|
||||
int i;
|
||||
for(i=0; i<bits; ++i)
|
||||
Out[i>>3] |= In[i]<<(i&7);
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Code ends at Line 231
|
||||
//////////////////////////////////////////////////////////////////////////
|
924
function.c
Normal file
924
function.c
Normal file
@ -0,0 +1,924 @@
|
||||
#include "version.h"
|
||||
#include <string.h>
|
||||
#include "common.h"
|
||||
#include "util.h"
|
||||
#include "char_event.h"
|
||||
#include "char.h"
|
||||
#include "item_event.h"
|
||||
#include "magic.h"
|
||||
#include "pet_event.h"
|
||||
#include "npc_townpeople.h"
|
||||
#include "npc_Dengon.h"
|
||||
#include "npc_door.h"
|
||||
#include "npc_healer.h"
|
||||
#include "npc_oldman.h"
|
||||
#include "npc_warp.h"
|
||||
#include "npc_storyteller.h"
|
||||
#include "npc_msg.h"
|
||||
#include "npc_npcenemy.h"
|
||||
#include "npc_action.h"
|
||||
#include "npc_windowman.h"
|
||||
#include "npc_savepoint.h"
|
||||
#include "npc_windowhealer.h"
|
||||
#include "npc_itemshop.h"
|
||||
#ifdef _VIGOR_SYS
|
||||
#include "npc_vigorshop.h"
|
||||
#endif
|
||||
#include "npc_sysinfo.h"
|
||||
#include "npc_duelranking.h"
|
||||
#include "npc_petskillshop.h"
|
||||
#ifdef _PETSKILL_DEL_SHOP
|
||||
#include "npc_petskilldelshop.h"
|
||||
#endif
|
||||
#include "npc_petshop.h"
|
||||
#include "npc_signboard.h"
|
||||
#include "npc_warpman.h"
|
||||
#include "npc_exchangeman.h"
|
||||
#include "petmail.h"
|
||||
#include "npc_timeman.h"
|
||||
#include "npc_bodylan.h"
|
||||
#include "npc_mic.h"
|
||||
#include "npc_luckyman.h"
|
||||
#include "npc_bus.h"
|
||||
#include "npc_charm.h"
|
||||
#include "npc_poolitemshop.h"
|
||||
#include "npc_quiz.h"
|
||||
#include "npc_checkman.h"
|
||||
#include "npc_janken.h"
|
||||
#include "npc_transmigration.h"
|
||||
#include "battle_event.h"
|
||||
#include "enemy.h"
|
||||
// Robin 0517
|
||||
#include "npc_familyman.h"
|
||||
#include "npc_bankman.h"
|
||||
// add code by shan
|
||||
#include "npc_fmdengon.h"
|
||||
#include "npc_fmhealer.h"
|
||||
#include "npc_petmaker.h"
|
||||
#ifdef _FMRANK_POINT
|
||||
#include "npc_fmrank.h"
|
||||
#endif
|
||||
// CoolFish: Family 2001/6/4
|
||||
#include "npc_fmwarpman.h"
|
||||
#include "npc_fmpkman.h"
|
||||
#include "npc_fmpkcallman.h"
|
||||
|
||||
// Arminius 7.7 Airplane
|
||||
#include "npc_airplane.h"
|
||||
|
||||
// Arminius 7.13 Scheduleman
|
||||
#include "npc_scheduleman.h"
|
||||
|
||||
// Arminius 7.24 manor scheduleman
|
||||
#include "npc_manorsman.h"
|
||||
|
||||
// Robin 0725
|
||||
#include "npc_riderman.h"
|
||||
#include "npc_fmletter.h"
|
||||
|
||||
#ifdef _GAMBLE_BANK
|
||||
#include "npc_gamblebank.h"
|
||||
#endif
|
||||
#ifdef _NEW_WARPMAN
|
||||
#include "npc_newnpcman.h"
|
||||
#endif
|
||||
|
||||
#ifdef _GAMBLE_ROULETTE
|
||||
#include "npc_gambleroulette.h"
|
||||
#include "npc_gamblemaster.h"
|
||||
#endif
|
||||
|
||||
#ifdef _TRANSER_MAN
|
||||
#include "npc_transerman.h"
|
||||
#endif
|
||||
|
||||
#ifdef _VIP_SHOP
|
||||
#include "npc_vipshop.h"
|
||||
//#include "npc_vippoint.h"
|
||||
#include "npc_newvipshop.h"
|
||||
#endif
|
||||
#ifdef _RMB_SYSTEM
|
||||
#include "npc_rmbshop.h"
|
||||
#endif
|
||||
#ifdef _STU_SYS
|
||||
#include "npc_stushop.h"
|
||||
#endif
|
||||
#ifdef _NPC_ITEMUP
|
||||
#include "npc_itemup.h"
|
||||
#endif
|
||||
#ifdef _AUTO_PK
|
||||
#include "npc_autopk.h"
|
||||
#endif
|
||||
#ifdef _CFREE_petskill
|
||||
#include "npc_freepetskillshop.h"
|
||||
#endif
|
||||
|
||||
#ifdef _PETRACE
|
||||
#include "npc_petracemaster.h"
|
||||
#include "npc_petracepet.h"
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_NPCCHANGE
|
||||
#include "npc_itemchange.h"
|
||||
#endif
|
||||
|
||||
#ifdef _NPC_MAKEPAIR
|
||||
#include "npc_makepair.h"
|
||||
#endif
|
||||
|
||||
#ifdef _NPC_FUSION
|
||||
#include "npc_petfusion.h"
|
||||
#endif
|
||||
|
||||
#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC
|
||||
#include "npc_alldoman.h"
|
||||
#endif
|
||||
|
||||
#ifdef _NPC_WELFARE
|
||||
#include "npc_welfare.h"
|
||||
#endif
|
||||
#ifdef _JZ_NEWSCRIPT_LUA
|
||||
#include "npc_lua_interface.h"
|
||||
#endif
|
||||
#ifdef _FM_NPC_LOOK_WAR
|
||||
#include "npc_fmlookwar.h"
|
||||
#endif
|
||||
#ifdef _FM_NPC_LOOK_WAR1
|
||||
#include "npc_fmlookwar1.h"
|
||||
#endif
|
||||
//#define DEBUG
|
||||
#include "npc_itemvippointshop.h"
|
||||
typedef struct tagCorrespondStringAndFunctionTable
|
||||
{
|
||||
STRING32 functionName;
|
||||
void* functionPointer;
|
||||
int hashcode;
|
||||
}CorrespondStringAndFunctionTable;
|
||||
|
||||
static CorrespondStringAndFunctionTable
|
||||
correspondStringAndFunctionTable[]=
|
||||
{
|
||||
{ {"core_PreWalk"}, CHAR_allprewalk, 0 },
|
||||
{ {"core_PostWalk"}, CHAR_allpostwalk, 0 },
|
||||
{ {"core_Loop"}, CHAR_loopFunc, 0 },
|
||||
{ {"core_Dying"}, CHAR_die, 0 },
|
||||
{ {"core_PlayerWatch"}, CHAR_playerWatchfunc, 0 },
|
||||
{ {"core_PlayerTalked"}, CHAR_playerTalkedfunc, 0 },
|
||||
|
||||
|
||||
{ {"MedicineInit"}, ITEM_MedicineInit, 0 },
|
||||
{ {"MedicineUsed"}, ITEM_MedicineUsed, 0 },
|
||||
{ {"SandClockDetach"}, ITEM_SandClockDetach, 0 },
|
||||
{ {"addTitleAttach"}, ITEM_addTitleAttach, 0 },
|
||||
{ {"delTitleDetach"}, ITEM_delTitleDetach, 0 },
|
||||
{ {"ITEM_DeleteByWatched"}, ITEM_DeleteByWatched, 0 },
|
||||
{ {"ITEM_DeleteTimeWatched"}, ITEM_DeleteTimeWatched, 0 },
|
||||
{ {"ITEM_useEffectTohelos"}, ITEM_useEffectTohelos, 0 },
|
||||
|
||||
// { {"ITEM_useHpRecovery"}, ITEM_useHpRecovery, 0 },
|
||||
{ {"ITEM_useRecovery"}, ITEM_useRecovery, 0 },
|
||||
#ifdef _ITEM_MAGICRECOVERY
|
||||
{ {"ITEM_useMRecovery"}, ITEM_useMRecovery, 0 },
|
||||
#endif
|
||||
#ifdef _ITEM_USEMAGIC
|
||||
{ {"ITEM_useMagic"}, ITEM_useMagic, 0 },
|
||||
#endif
|
||||
{ {"ITEM_useStatusChange"}, ITEM_useStatusChange, 0 },
|
||||
{ {"ITEM_useStatusRecovery"}, ITEM_useStatusRecovery, 0 },
|
||||
{ {"ITEM_useMagicDef"}, ITEM_useMagicDef, 0 },
|
||||
{ {"ITEM_useParamChange"}, ITEM_useParamChange, 0 },
|
||||
{ {"ITEM_useFieldChange"}, ITEM_useFieldChange, 0 },
|
||||
{ {"ITEM_useAttReverse"}, ITEM_useAttReverse, 0 },
|
||||
{ {"ITEM_useRessurect"}, ITEM_useRessurect, 0 },
|
||||
{ {"ITEM_useMic"}, ITEM_useMic, 0 },
|
||||
{ {"ITEM_dropMic"}, ITEM_dropMic, 0 },
|
||||
{ {"ITEM_useCaptureUp"}, ITEM_useCaptureUp, 0 },
|
||||
{ {"ITEM_useRenameItem"}, ITEM_useRenameItem, 0 },
|
||||
{ {"ITEM_pickupDice"}, ITEM_pickupDice, 0 },
|
||||
{ {"ITEM_dropDice"}, ITEM_dropDice, 0 },
|
||||
{ {"ITEM_initLottery"}, ITEM_initLottery, 0 },
|
||||
{ {"ITEM_useLottery"}, ITEM_useLottery, 0 },
|
||||
{ {"ITEM_useWarp"}, ITEM_useWarp, 0 },
|
||||
{ {"ITEM_petFollow"}, ITEM_petFollow, 0 },
|
||||
{ {"ITEM_useSkup"}, ITEM_useSkup, 0 }, // Nuke 0624: Hero's bless
|
||||
{ {"ITEM_useNoenemy"}, ITEM_useNoenemy, 0 }, // Nuke 0626: Dragon's help
|
||||
{ {"ITEM_equipNoenemy"},ITEM_equipNoenemy, 0 }, // Arminius 7.2 Ra's amulet
|
||||
{ {"ITEM_remNoenemy"}, ITEM_remNoenemy, 0 }, // Arminius 7.2 Ra's amulet
|
||||
{ {"ITEM_useEncounter"}, ITEM_useEncounter, 0}, // Arminius 7.31 cursed stone
|
||||
|
||||
{ {"ITEM_AddPRSkillPoint"}, ITEM_AddPRSkillPoint, 0},
|
||||
{ {"ITEM_AddPRSkillPercent"}, ITEM_AddPRSkillPercent, 0},
|
||||
|
||||
#ifdef _ITEM_METAMO
|
||||
{ {"ITEM_metamo"}, ITEM_metamo, 0 },
|
||||
{ {"ITEM_ColorMetamo"}, ITEM_ColorMetamo, 0 },
|
||||
{ {"ITEM_CharaMetamo"}, ITEM_CharaMetamo, 0 },
|
||||
{ {"ITEM_SexMetamo"}, ITEM_SexMetamo, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _USEWARP_FORNUM
|
||||
{ {"ITEM_useWarpForNum"}, ITEM_useWarpForNum, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _IMPRECATE_ITEM
|
||||
{ {"ITEM_useImprecate"}, ITEM_useImprecate, 0 },
|
||||
#endif
|
||||
#ifdef _ITEM_FIRECRACKER //Terry add 2001/12/21
|
||||
{ {"ITEM_firecracker"}, ITEM_firecracker, 0 },
|
||||
#endif
|
||||
#ifdef _ITEM_CRACKER //vincent 拉炮
|
||||
{ {"ITEM_Cracker"}, ITEM_Cracker, 0 },
|
||||
#endif
|
||||
#ifdef _ITEM_ADDEXP //vincent 经验提升
|
||||
{ {"ITEM_Addexp"}, ITEM_Addexp, 0 },
|
||||
#endif
|
||||
#ifdef _ITEM_REFRESH //vincent 解除异常状态道具
|
||||
{ {"ITEM_Refresh"}, ITEM_Refresh, 0 },
|
||||
#endif
|
||||
|
||||
{ {"ITEM_WearEquip"}, ITEM_WearEquip, 0 },
|
||||
{ {"ITEM_ReWearEquip"}, ITEM_ReWearEquip, 0 },
|
||||
|
||||
#ifdef _ITEM_CONSTITUTION
|
||||
{ {"ITEM_Constitution"}, ITEM_Constitution, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _Item_ReLifeAct
|
||||
{ {"ITEM_DIErelife"}, ITEM_DIErelife, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_ORNAMENTS
|
||||
{ {"ITEM_PutOrnaments"}, ITEM_PutOrnaments, 0},
|
||||
#endif
|
||||
#ifdef _CHIKULA_STONE
|
||||
{ {"ITEM_ChikulaStone"}, ITEM_ChikulaStone, 0},
|
||||
#endif
|
||||
|
||||
#ifdef _THROWITEM_ITEMS
|
||||
{ {"ITEM_ThrowItemBox"}, ITEM_ThrowItemBox, 0},
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_WATERWORDSTATUS
|
||||
{ {"ITEM_WaterWordStatus"}, ITEM_WaterWordStatus, 0},
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_LOVERPARTY
|
||||
{ {"ITEM_LoverSelectUser"}, ITEM_LoverSelectUser, 0},
|
||||
#endif
|
||||
|
||||
#ifdef _Item_MoonAct
|
||||
{ {"ITEM_randEnemyEquipOne"}, ITEM_randEnemyEquipOne, 0 },
|
||||
|
||||
{ {"ITEM_randEnemyEquip"}, ITEM_randEnemyEquip, 0 },
|
||||
{ {"ITEM_RerandEnemyEquip"}, ITEM_RerandEnemyEquip, 0},
|
||||
#endif
|
||||
|
||||
#ifdef _SUIT_ITEM
|
||||
{ {"ITEM_suitEquip"}, ITEM_suitEquip, 0 },
|
||||
{ {"ITEM_ResuitEquip"}, ITEM_ResuitEquip, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _Item_DeathAct
|
||||
{ {"ITEM_useDeathcounter"}, ITEM_UseDeathCounter, 0 },
|
||||
#endif
|
||||
#ifdef _FEV_ADD_NEW_ITEM // FEV ADD 增加复活守精
|
||||
{ {"ITEM_ResAndDef"} , ITEM_ResAndDef, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _CHRISTMAS_REDSOCKS
|
||||
{ {"ITEM_useMaxRedSocks"}, ITEM_useMaxRedSocks, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _CHRISTMAS_REDSOCKS_NEW
|
||||
{ {"ITEM_useMaxRedSocksNew"}, ITEM_useMaxRedSocksNew, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_CANNEDFOOD
|
||||
{ {"ITEM_useSkillCanned"}, ITEM_useSkillCanned, 0},
|
||||
#endif
|
||||
|
||||
#ifdef _NEW_RIDEPETS
|
||||
{ {"ITEM_useLearnRideCode"}, ITEM_useLearnRideCode, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _EQUIT_DEFMAGIC
|
||||
{ {"ITEM_MagicEquitWear"}, ITEM_MagicEquitWear, 0 },
|
||||
{ {"ITEM_MagicEquitReWear"}, ITEM_MagicEquitReWear, 0 },
|
||||
#endif
|
||||
#ifdef _EQUIT_RESIST
|
||||
{ {"ITEM_MagicResist"}, ITEM_MagicResist, 0 },
|
||||
{ {"ITEM_MagicReResist"}, ITEM_MagicReResist, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _MAGIC_RESIST_EQUIT // WON ADD 职业抗性装备
|
||||
{ {"ITEM_P_MagicEquitWear"}, ITEM_P_MagicEquitWear, 0 },
|
||||
{ {"ITEM_P_MagicEquitReWear"}, ITEM_P_MagicEquitReWear, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _ANGEL_SUMMON
|
||||
{ {"ITEM_AngelToken"}, ITEM_AngelToken, 0 },
|
||||
{ {"ITEM_HeroToken"}, ITEM_HeroToken, 0 },
|
||||
#endif
|
||||
#ifdef _HALLOWEEN_EFFECT
|
||||
{ {"ITEM_MapEffect"}, ITEM_MapEffect, 0 },
|
||||
#endif
|
||||
|
||||
{ {"ITEM_changePetOwner"}, ITEM_changePetOwner, 0 },
|
||||
|
||||
{ {"ITEM_useDelRenameItem"}, ITEM_useDelRenameItem, 0 },
|
||||
|
||||
{ {"ITEM_DANMM"}, ITEM_DANMM, 0 },
|
||||
|
||||
{ {"core_PetWatch"}, PET_Watchfunc, 0 },
|
||||
{ {"PETMAIL_Loop"}, PETMAIL_Loopfunc, 0 },
|
||||
#ifdef _USER_CHARLOOPS
|
||||
{ {"CHAR_BattleStayLoop"}, CHAR_BattleStayLoop, 0 },
|
||||
{ {"PET_CheckIncubateLoop"}, PET_CheckIncubate, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_PROPERTY
|
||||
{ {"PET_PetskillPropertyEvent"}, PET_PetskillPropertyEvent, 0 },
|
||||
#endif
|
||||
{ {"core_PetTalk"}, PET_Talkfunc, 0}, // Arminius 8.14 pet talk
|
||||
|
||||
|
||||
/* warp */
|
||||
{ {"WarpInit"}, NPC_WarpInit, 0 },
|
||||
{ {"WarpPostOver"}, NPC_WarpPostOver, 0 },
|
||||
{ {"WarpWatch"}, NPC_WarpWatch, 0 },
|
||||
|
||||
/* Dengon */
|
||||
{ {"DengonInit"}, NPC_DengonInit, 0 },
|
||||
{ {"DengonWindowTalked"}, NPC_DengonWindowTalked, 0 },
|
||||
{ {"DengonLooked"}, NPC_DengonLooked, 0 },
|
||||
|
||||
/* FmDengon add code by shan */
|
||||
{ {"FmDengonInit"}, NPC_FmDengonInit, 0 },
|
||||
{ {"FmDengonWindowTalked"}, NPC_FmDengonWindowTalked, 0 },
|
||||
{ {"FmDengonLooked"}, NPC_FmDengonLooked, 0 },
|
||||
|
||||
/* Healer */
|
||||
{ {"HealerInit"} , NPC_HealerInit, 0 },
|
||||
{ {"HealerTalked"} , NPC_HealerTalked , 0 },
|
||||
|
||||
/* FMHealer add code by shan */
|
||||
{ {"FmHealerInit"} , NPC_FmHealerInit, 0 },
|
||||
{ {"FmHealerTalked"} , NPC_FmHealerTalked , 0 },
|
||||
|
||||
/* petmaker add code by shan */
|
||||
{ {"PetMakerInit"} , NPC_PetMakerInit, 0 },
|
||||
{ {"PetMakerTalked"} , NPC_PetMakerTalked , 0 },
|
||||
|
||||
/* TownPeople */
|
||||
{ {"TownPeopleTalked"}, NPC_TownPeopleTalked, 0 },
|
||||
{ {"TownPeopleInit"}, NPC_TownPeopleInit, 0 },
|
||||
|
||||
/* TownPeople */
|
||||
{ {"MsgLooked"}, NPC_MsgLooked , 0 },
|
||||
{ {"MsgInit"}, NPC_MsgInit, 0 },
|
||||
|
||||
/* Oldman */
|
||||
{ {"OldmanInit"} , NPC_OldmanInit , 0 },
|
||||
{ {"OldmanTalked"} , NPC_OldmanTalked , 0 },
|
||||
|
||||
/* SavePOint */
|
||||
{ {"SavePointInit"} , NPC_SavePointInit , 0 },
|
||||
{ {"SavePointTalked"} , NPC_SavePointTalked , 0 },
|
||||
{ {"SavePointWindowTalked"}, NPC_SavePointWindowTalked, 0 },
|
||||
|
||||
/* StoryTeller */
|
||||
{ {"StoryTellerInit"} , NPC_StoryTellerInit , 0 },
|
||||
{ {"StoryTellerTalked"} , NPC_StoryTellerTalked , 0 },
|
||||
|
||||
/* NPCEnemy */
|
||||
{ {"NPCEnemyInit"} , NPC_NPCEnemyInit , 0 },
|
||||
{ {"NPCEnemyTalked"} , NPC_NPCEnemyTalked , 0 },
|
||||
{ {"NPCEnemyWatch"} , NPC_NPCEnemyWatch , 0 },
|
||||
{ {"NPCEnemyLoop"}, NPC_NPCEnemyLoop, 0 },
|
||||
{ {"NPCEnemyWindowTalked"}, NPC_NPCEnemyWindowTalked, 0 },
|
||||
|
||||
/* 失弁扑亦件楝 */
|
||||
{ {"ActionInit"} , NPC_ActionInit , 0 },
|
||||
{ {"ActionTalked"} , NPC_ActionTalked , 0 },
|
||||
{ {"ActionWatch"} , NPC_ActionWatch , 0 },
|
||||
|
||||
/* 它奴件玉它楝 */
|
||||
{ {"WindowmanInit"} , NPC_WindowmanInit , 0 },
|
||||
{ {"WindowmanTalked"} , NPC_WindowmanTalked , 0 },
|
||||
{ {"WindowmanLooked"}, NPC_WindowmanLooked, 0 },
|
||||
{ {"WindowmanWindowTalked"}, NPC_WindowmanWindowTalked, 0 },
|
||||
|
||||
/* 它奴件玉它甲□仿□ */
|
||||
{ {"WindowHealerInit"} , NPC_WindowHealerInit , 0 },
|
||||
{ {"WindowHealerTalked"} , NPC_WindowHealerTalked, 0 },
|
||||
{ {"WindowHealerLooked"} , NPC_WindowHealerLooked, 0 },
|
||||
{ {"WindowHealerWindowTalked"}, NPC_WindowHealerWindowTalked, 0 },
|
||||
|
||||
{ {"ItemShopInit"} , NPC_ItemShopInit , 0 },
|
||||
{ {"ItemShopTalked"} , NPC_ItemShopTalked , 0 },
|
||||
{ {"ItemShopWindowTalked"}, NPC_ItemShopWindowTalked, 0 },
|
||||
|
||||
{ {"ItemVippointShopInit"} , NPC_ItemVippointShopInit , 0 },
|
||||
{ {"ItemVippointShopTalked"} , NPC_ItemVippointShopTalked , 0 },
|
||||
{ {"ItemVippointShopWindowTalked"}, NPC_ItemVippointShopWindowTalked, 0 },
|
||||
|
||||
/* Sysinfo */
|
||||
{ {"SysinfoInit"}, NPC_SysinfoInit, 0 },
|
||||
{ {"SysinfoLoop"}, NPC_SysinfoLoop, 0 },
|
||||
{ {"SysinfoTalked"} , NPC_SysinfoTalked , 0 },
|
||||
|
||||
{ {"DuelrankingInit"} , NPC_DuelrankingInit , 0 },
|
||||
{ {"DuelrankingLooked"}, NPC_DuelrankingLooked, 0 },
|
||||
{ {"DuelrankingWindowTalked"}, NPC_DuelrankingWindowTalked, 0 },
|
||||
|
||||
{ {"PetSkillShopInit"} , NPC_PetSkillShopInit , 0 },
|
||||
{ {"PetSkillShopTalked"} , NPC_PetSkillShopTalked, 0 },
|
||||
{ {"PetSkillShopLooked"} , NPC_PetSkillShopLooked, 0 },
|
||||
{ {"PetSkillShopWindowTalked"}, NPC_PetSkillShopWindowTalked, 0 },
|
||||
#ifdef _PETSKILL_DEL_SHOP
|
||||
{ {"PetSkillDelShopInit"} , NPC_PetSkillDelShopInit , 0 },
|
||||
{ {"PetSkillDelShopTalked"} , NPC_PetSkillDelShopTalked, 0 },
|
||||
{ {"PetSkillDelShopLooked"} , NPC_PetSkillDelShopLooked, 0 },
|
||||
{ {"PetSkillDelShopWindowTalked"}, NPC_PetSkillDelShopWindowTalked, 0 },
|
||||
#endif
|
||||
{ {"PetShopInit"} , NPC_PetShopInit, 0 },
|
||||
{ {"PetShopTalked"} , NPC_PetShopTalked, 0 },
|
||||
{ {"PetShopLooked"} , NPC_PetShopLooked, 0 },
|
||||
{ {"PetShopWindowTalked"}, NPC_PetShopWindowTalked,0 },
|
||||
|
||||
{ {"SignBoardInit"} , NPC_SignBoardInit, 0 },
|
||||
{ {"SignBoardLooked"} , NPC_SignBoardLooked, 0 },
|
||||
{ {"SignBoardWindowTalked"}, NPC_SignBoardWindowTalked, 0 },
|
||||
|
||||
/*伐□皿穴件 */
|
||||
{ {"WarpManInit"}, NPC_WarpManInit, 0 },
|
||||
{ {"WarpManTalked"}, NPC_WarpManTalked, 0 },
|
||||
{ {"WarpManWatch"}, NPC_WarpManWatch, 0 },
|
||||
{ {"WarpManLoop"} , NPC_WarpManLoop, 0 },
|
||||
{ {"WarpManWindowTalked"}, NPC_WarpManWindowTalked,0 },
|
||||
|
||||
|
||||
{ {"ExChangeManInit"}, NPC_ExChangeManInit, 0 },
|
||||
{ {"ExChangeManTalked"}, NPC_ExChangeManTalked, 0 },
|
||||
{ {"ExChangeManWindowTalked"}, NPC_ExChangeManWindowTalked,0 },
|
||||
|
||||
/*正奶丞穴件 */
|
||||
{ {"TimeManInit"}, NPC_TimeManInit, 0 },
|
||||
{ {"TimeManTalked"}, NPC_TimeManTalked, 0 },
|
||||
{ {"TimeManWatch"} , NPC_TimeManWatch , 0 },
|
||||
|
||||
/* 示犯奴仿件必□斥 */
|
||||
{ {"BodyLanInit"}, NPC_BodyLanInit, 0 },
|
||||
{ {"BodyLanTalked"}, NPC_BodyLanTalked, 0 },
|
||||
{ {"BodyLanWatch"} , NPC_BodyLanWatch , 0 },
|
||||
{ {"BodyLanWindowTalked"} , NPC_BodyLanWindowTalked,0 },
|
||||
|
||||
/* 穴奶弁 */
|
||||
{ {"MicInit"}, NPC_MicInit, 0 },
|
||||
{ {"MicTalked"}, NPC_MicTalked, 0 },
|
||||
|
||||
/* 仿永平□穴件 */
|
||||
{ {"LuckyManInit"} , NPC_LuckyManInit , 0 },
|
||||
{ {"LuckyManTalked"} , NPC_LuckyManTalked, 0 },
|
||||
{ {"LuckyManWindowTalked"}, NPC_LuckyManWindowTalked, 0 },
|
||||
|
||||
/* 楝 */
|
||||
{ {"BusInit"} , NPC_BusInit , 0 },
|
||||
{ {"BusTalked"} , NPC_BusTalked , 0 },
|
||||
{ {"BusLoop"} , NPC_BusLoop , 0 },
|
||||
|
||||
/* 加美航空 */ // Arminius 7.7 Airplane
|
||||
{ {"AirInit"} , NPC_AirInit , 0 },
|
||||
{ {"AirTalked"} , NPC_AirTalked , 0 },
|
||||
{ {"AirLoop"} , NPC_AirLoop , 0 },
|
||||
|
||||
{ {"CharmInit"} , NPC_CharmInit , 0 },
|
||||
{ {"CharmTalked"} , NPC_CharmTalked, 0 },
|
||||
{ {"CharmWindowTalked"}, NPC_CharmWindowTalked, 0 },
|
||||
|
||||
{ {"PoolItemShopInit"} , NPC_PoolItemShopInit , 0 },
|
||||
{ {"PoolItemShopLoop"} , NPC_PoolItemShopLoop , 0 },
|
||||
{ {"PoolItemShopTalked"} , NPC_PoolItemShopTalked , 0 },
|
||||
{ {"PoolItemShopWindowTalked"}, NPC_PoolItemShopWindowTalked, 0 },
|
||||
|
||||
{ {"QuizInit"} , NPC_QuizInit , 0 },
|
||||
{ {"QuizTalked"} , NPC_QuizTalked, 0 },
|
||||
{ {"QuizWindowTalked"}, NPC_QuizWindowTalked, 0 },
|
||||
|
||||
|
||||
/* 切之匀仁引氏 */
|
||||
{ {"CheckManInit"} , NPC_CheckManInit , 0 },
|
||||
{ {"CheckManTalked"} , NPC_CheckManTalked, 0 },
|
||||
{ {"CheckManWindowTalked"}, NPC_CheckManWindowTalked, 0 },
|
||||
|
||||
/* 元扎氏仃氏楝 */
|
||||
{ {"JankenInit"} , NPC_JankenInit , 0 },
|
||||
{ {"JankenTalked"} , NPC_JankenTalked, 0 },
|
||||
{ {"JankenWindowTalked"}, NPC_JankenWindowTalked, 0 },
|
||||
|
||||
/* 鳖戏谛 */
|
||||
{ {"TransmigrationInit"} , NPC_TransmigrationInit , 0 },
|
||||
{ {"TransmigrationTalked"} , NPC_TransmigrationTalked, 0 },
|
||||
{ {"TransmigrationWindowTalked"}, NPC_TransmigrationWindowTalked, 0 },
|
||||
|
||||
/* Family man */
|
||||
{ {"FamilymanInit"} , NPC_FamilymanInit , 0 },
|
||||
{ {"FamilymanTalked"} , NPC_FamilymanTalked, 0 },
|
||||
{ {"FamilymanLooked"}, NPC_FamilymanLooked,0 },
|
||||
{ {"FamilymanWindowTalked"}, NPC_FamilymanWindowTalked, 0 },
|
||||
|
||||
/* CoolFish: Family WarpMan 2001/6/6 */
|
||||
{ {"FMWarpManInit"}, NPC_FMWarpManInit, 0 },
|
||||
{ {"FMWarpManTalked"}, NPC_FMWarpManTalked, 0 },
|
||||
{ {"FMWarpManLoop"} , NPC_FMWarpManLoop, 0 },
|
||||
{ {"FMWarpManWindowTalked"}, NPC_FMWarpManWindowTalked, 0 },
|
||||
|
||||
/* CoolFish: Family PKMan 2001/7/4 */
|
||||
{ {"FMPKManInit"}, NPC_FMPKManInit, 0 },
|
||||
{ {"FMPKManTalked"}, NPC_FMPKManTalked, 0 },
|
||||
{ {"FMPKManWindowTalked"}, NPC_FMPKManWindowTalked, 0 },
|
||||
|
||||
/* CoolFish: Family PKCallMan 2001/7/13 */
|
||||
{ {"FMPKCallManInit"}, NPC_FMPKCallManInit, 0 },
|
||||
{ {"FMPKCallManTalked"}, NPC_FMPKCallManTalked, 0 },
|
||||
{ {"FMPKCallManWindowTalked"}, NPC_FMPKCallManWindowTalked, 0 },
|
||||
|
||||
/* Bank man */
|
||||
{ {"BankmanInit"} , NPC_BankmanInit , 0 },
|
||||
{ {"BankmanTalked"} , NPC_BankmanTalked, 0 },
|
||||
{ {"BankmanLooked"}, NPC_BankmanLooked,0 },
|
||||
{ {"BankmanWindowTalked"}, NPC_BankmanWindowTalked, 0 },
|
||||
|
||||
/* Arminius 7.13 scheduleman */
|
||||
{ {"SchedulemanInit"}, NPC_SchedulemanInit, 0},
|
||||
{ {"SchedulemanTalked"}, NPC_SchedulemanTalked, 0},
|
||||
{ {"SchedulemanWindowTalked"}, NPC_SchedulemanWindowTalked, 0},
|
||||
{ {"SchedulemanLoop"}, NPC_SchedulemanLoop, 0},
|
||||
|
||||
/* Arminius 7.24 manor scheduleman */
|
||||
{ {"ManorSmanInit"}, NPC_ManorSmanInit, 0},
|
||||
{ {"ManorSmanTalked"}, NPC_ManorSmanTalked, 0},
|
||||
{ {"ManorSmanWindowTalked"}, NPC_ManorSmanWindowTalked, 0},
|
||||
{ {"ManorSmanLoop"}, NPC_ManorSmanLoop, 0},
|
||||
|
||||
/* Rider man */
|
||||
{ {"RidermanInit"} , NPC_RidermanInit , 0 },
|
||||
{ {"RidermanTalked"} , NPC_RidermanTalked, 0 },
|
||||
{ {"RidermanLooked"}, NPC_RidermanLooked,0 },
|
||||
{ {"RidermanWindowTalked"}, NPC_RidermanWindowTalked, 0 },
|
||||
|
||||
/* FmLetter man */
|
||||
{ {"FmLetterInit"} , NPC_FmLetterInit , 0 },
|
||||
{ {"FmLetterTalked"} , NPC_FmLetterTalked, 0 },
|
||||
{ {"FmLetterLooked"}, NPC_FmLetterLooked,0 },
|
||||
{ {"FmLetterWindowTalked"}, NPC_FmLetterWindowTalked, 0 },
|
||||
|
||||
|
||||
#ifdef _GAMBLE_BANK //银行
|
||||
{ {"GambleBankInit"}, NPC_GambleBankInit, 0},
|
||||
{ {"GambleBankLoop"}, NPC_GambleBankLoop,0},
|
||||
{ {"GambleBankTalked"}, NPC_GambleBankTalked,0},
|
||||
{ {"GambleBankWindowTalked"}, NPC_GambleBankWindowTalked,0},
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _PET_LIMITLEVEL
|
||||
{ {"ITEM_useOtherEditBase"}, ITEM_useOtherEditBase, 0},
|
||||
#endif
|
||||
#ifdef _ITEM_EDITBASES
|
||||
{ {"ITEM_useFusionEditBase"}, ITEM_useFusionEditBase, 0},
|
||||
#endif
|
||||
#ifdef _GAMBLE_ROULETTE //赌场轮盘
|
||||
{ {"GambleRouletteInit"}, NPC_Gamble_RouletteInit, 0},
|
||||
{ {"GambleRouletteLoop"}, NPC_Gamble_RouletteLoop, 0},
|
||||
{ {"GambleRouletteTalked"}, NPC_Gamble_RouletteTalked, 0},
|
||||
{ {"GambleRouletteWindowTalked"}, NPC_Gamble_RouletteWindowTalked, 0},
|
||||
|
||||
{ {"GambleMasterInit"}, NPC_Gamble_MasterInit, 0},
|
||||
{ {"GambleMasterLoop"}, NPC_Gamble_MasterLoop, 0},
|
||||
{ {"GambleMasterTalked"}, NPC_Gamble_MasterTalked, 0},
|
||||
{ {"GambleMasterWindowTalked"}, NPC_Gamble_MasterWindowTalked, 0},
|
||||
#endif
|
||||
|
||||
#ifdef _TRANSER_MAN
|
||||
{ {"TranserManInit"}, NPC_TranserManInit, 0 },
|
||||
{ {"TranserManTalked"}, NPC_TranserManTalked, 0 },
|
||||
{ {"TranserManLoop"} , NPC_TranserManLoop, 0 },
|
||||
{ {"TranserManWindowTalked"}, NPC_TranserManWindowTalked, 0 },
|
||||
#endif
|
||||
#ifdef _FM_NPC_LOOK_WAR
|
||||
{ {"FmLookWarManInit"}, NPC_FmLookWarManInit, 0 },
|
||||
{ {"FmLookWarManTalked"}, NPC_FmLookWarManTalked, 0 },
|
||||
{ {"FmLookWarManLoop"} , NPC_FmLookWarManLoop, 0 },
|
||||
{ {"FmLookWarManWindowTalked"}, NPC_FmLookWarManWindowTalked, 0 },
|
||||
#endif
|
||||
#ifdef _FM_NPC_LOOK_WAR1
|
||||
{ {"FmLookWarMan1Init"}, NPC_FmLookWarMan1Init, 0 },
|
||||
{ {"FmLookWarMan1Talked"}, NPC_FmLookWarMan1Talked, 0 },
|
||||
{ {"FmLookWarMan1Loop"} , NPC_FmLookWarMan1Loop, 0 },
|
||||
{ {"FmLookWarMan1WindowTalked"}, NPC_FmLookWarMan1WindowTalked, 0 },
|
||||
#endif
|
||||
#ifdef _VIP_SHOP
|
||||
{ {"VipShopInit"}, NPC_VipshopInit, 0 },
|
||||
{ {"VipShopTalked"}, NPC_VipshopTalked, 0 },
|
||||
{ {"VipShopLoop"} , NPC_VipshopLoop, 0 },
|
||||
{ {"VipShopWindowTalked"}, NPC_VipshopWindowTalked, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _VIP_SHOP
|
||||
{ {"NewVipShopInit"}, NPC_NewVipshopInit, 0 },
|
||||
{ {"NewVipShopTalked"}, NPC_NewVipshopTalked, 0 },
|
||||
{ {"NewVipShopLoop"} , NPC_NewVipshopLoop, 0 },
|
||||
{ {"NewVipShopWindowTalked"}, NPC_NewVipshopWindowTalked, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _RMB_SYSTEM
|
||||
{ {"RmbShopInit"}, NPC_RmbshopInit, 0 },
|
||||
{ {"RmbShopTalked"}, NPC_RmbshopTalked, 0 },
|
||||
{ {"RmbShopLoop"} , NPC_RmbshopLoop, 0 },
|
||||
{ {"RmbShopWindowTalked"}, NPC_RmbshopWindowTalked, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _STU_SYS
|
||||
{ {"StuShopInit"}, NPC_StushopInit, 0 },
|
||||
{ {"StuShopTalked"}, NPC_StushopTalked, 0 },
|
||||
{ {"StuShopLoop"} , NPC_StushopLoop, 0 },
|
||||
{ {"StuShopWindowTalked"}, NPC_StushopWindowTalked, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _AUTO_PK
|
||||
{ {"AutoPkInit"}, NPC_AutoPkInit, 0 },
|
||||
{ {"AutoPkTalked"}, NPC_AutoPkTalked, 0 },
|
||||
{ {"AutoPkLoop"} , NPC_AutoPkLoop, 0 },
|
||||
{ {"AutoPkWindowTalked"}, NPC_AutoPkWindowTalked, 0 },
|
||||
#endif
|
||||
#ifdef _FMRANK_POINT
|
||||
{ {"FmRankInit"}, NPC_FmRankInit, 0 },
|
||||
{ {"FmRankTalked"}, NPC_FmRankTalked, 0 },
|
||||
{ {"FmRankLoop"} , NPC_FmRankLoop, 0 },
|
||||
{ {"FmRankWindowTalked"}, NPC_FmRankWindowTalked, 0 },
|
||||
#endif
|
||||
#ifdef _NPC_MAKEPAIR
|
||||
{ {"MakePairManInit"}, NPC_MakePairManInit, 0 },
|
||||
{ {"MakePairManTalked"}, NPC_MakePairManTalked, 0 },
|
||||
{ {"MakePairManLoop"} , NPC_MakePairManLoop, 0 },
|
||||
{ {"MakePairManWindowTalked"}, NPC_MakePairManWindowTalked,0 },
|
||||
#endif
|
||||
#ifdef _NPC_FUSION
|
||||
{ {"PetFusionManInit"}, NPC_PetFusionManInit, 0 },
|
||||
{ {"PetFusionManTalked"}, NPC_PetFusionManTalked, 0 },
|
||||
{ {"PetFusionManLoop"} , NPC_PetFusionManLoop, 0 },
|
||||
{ {"PetFusionManWindowTalked"}, NPC_PetFusionManWindowTalked,0 },
|
||||
#endif
|
||||
#ifdef _ITEM_NPCCHANGE
|
||||
{ {"ItemchangeManInit"}, NPC_ItemchangeManInit, 0 },
|
||||
{ {"ItemchangeManTalked"}, NPC_ItemchangeManTalked, 0 },
|
||||
{ {"ItemchangeManLoop"} , NPC_ItemchangeManLoop, 0 },
|
||||
{ {"ItemchangeManWindowTalked"}, NPC_ItemchangeManWindowTalked, 0 },
|
||||
#endif
|
||||
#ifdef _NPC_ITEMUP
|
||||
{ {"ItemupManInit"}, NPC_ItemupManInit, 0 },
|
||||
{ {"ItemupManTalked"}, NPC_ItemupManTalked, 0 },
|
||||
{ {"ItemupManLoop"} , NPC_ItemupManLoop, 0 },
|
||||
{ {"ItemupManWindowTalked"}, NPC_ItemupManWindowTalked, 0 },
|
||||
#endif
|
||||
#ifdef _CFREE_petskill
|
||||
{ {"FreePetSkillInit"} , NPC_FreePetSkillShopInit, 0 },
|
||||
{ {"FreePetSkillTalked"} , NPC_FreePetSkillShopTalked, 0 },
|
||||
{ {"FreePetSkillWindowTalked"}, NPC_FreePetSkillShopWindowTalked, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _PETRACE // 宠物竞速
|
||||
{ {"PetRaceMasterInit"}, NPC_PetRaceMasterInit, 0},
|
||||
{ {"PetRaceMasterLoop"}, NPC_PetRaceMasterLoop, 0},
|
||||
{ {"PetRaceMasterTalked"}, NPC_PetRaceMasterTalked, 0},
|
||||
{ {"PetRaceMasterWindowTalked"}, NPC_PetRaceMasterWindowTalked, 0},
|
||||
|
||||
{ {"PetRacePetInit"}, NPC_PetRacePetInit, 0},
|
||||
{ {"PetRacePetLoop"}, NPC_PetRacePetLoop, 0},
|
||||
{ {"PetRacePetTalked"}, NPC_PetRacePetTalked, 0},
|
||||
#endif
|
||||
|
||||
#ifdef _NEW_WARPMAN
|
||||
{ {"NewNpcManInit"}, NPC_NewNpcManInit, 0},
|
||||
{ {"NewNpcManLoop"}, NPC_NewNpcManLoop, 0},
|
||||
{ {"NewNpcManTalked"}, NPC_NewNpcManTalked, 0},
|
||||
{ {"NewNpcManWindowTalked"}, NPC_NewNpcManWindowTalked, 0},
|
||||
#endif
|
||||
|
||||
#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC
|
||||
{ {"AlldomanInit"} , NPC_AlldomanInit, 0 },
|
||||
{ {"AlldomanTalked"} , NPC_AlldomanTalked , 0 },
|
||||
{ {"AlldomanWindowTalked"}, NPC_AlldomanWindowTalked , 0},
|
||||
#endif
|
||||
|
||||
#ifdef _NPC_WELFARE
|
||||
{ {"WelfareInit"} , NPC_WelfareInit, 0 },
|
||||
{ {"WelfareTalked"} , NPC_WelfareTalked , 0 },
|
||||
{ {"WelfareWindowTalked"}, NPC_WelfareWindowTalked , 0},
|
||||
#endif
|
||||
#ifdef _VIGOR_SYS
|
||||
{ {"ItemVigorShopInit"} , NPC_ItemVigorShopInit , 0 },
|
||||
{ {"ItemVigorShopTalked"} , NPC_ItemVigorShopTalked , 0 },
|
||||
{ {"ItemVigorShopWindowTalked"}, NPC_ItemVigorShopWindowTalked, 0 },
|
||||
#endif
|
||||
#ifdef _TIME_TICKET
|
||||
{ {"ITEM_timeticket"}, ITEM_timeticket, 0},
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_SETLOVER // 结婚物品
|
||||
{ {"ITEM_SetLoverUser"}, ITEM_SetLoverUser, 0 },
|
||||
{ {"ITEM_LoverWarp"}, ITEM_LoverWarp, 0 },
|
||||
{ {"ITEM_LoverUnmarry"}, ITEM_LoverUnmarry, 0 },
|
||||
{ {"ITEM_LoverForceUnmarry"}, ITEM_LoverForceUnmarry, 0 }, //强制离婚
|
||||
#endif
|
||||
|
||||
#ifdef _GM_ITEM // GM命令物品
|
||||
{ {"ITEM_GMFUNCTION"}, ITEM_GMFUNCTION, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _VIP_SERVER // 会员服务
|
||||
{ {"ITEM_AddMemberPoint"}, ITEM_AddMemberPoint, 0 },
|
||||
{ {"ITEM_AddVipPoint"}, ITEM_AddVipPoint, 0 },
|
||||
#endif
|
||||
#ifdef _VIP_RIDE
|
||||
{ {"ITEM_VipRide"}, ITEM_VipRide, 0 },
|
||||
#endif
|
||||
#ifdef _NEW_NAME //自定义称号
|
||||
{ {"ITEM_NewName"}, ITEM_NewName, 0 },
|
||||
#endif
|
||||
#ifdef _FM_ITEM
|
||||
{ {"ITEM_AddFame"}, ITEM_AddFame, 0 },
|
||||
#endif
|
||||
#ifdef _LUCK_ITEM
|
||||
{ {"ITEM_Luck"}, ITEM_Luck, 0 },
|
||||
#endif
|
||||
#ifdef _FM_METAMO
|
||||
{ {"ITEM_MetamoTime"}, ITEM_MetamoTime, 0 },
|
||||
#endif
|
||||
#ifdef _ITEM_GOLD
|
||||
{ {"ITEM_Gold"}, ITEM_Gold, 0 },
|
||||
#endif
|
||||
#ifdef _MYSTERIOUS_GIFT
|
||||
{ {"ITEM_MysteriousGift"}, ITEM_MysteriousGift, 0 },
|
||||
#endif
|
||||
#ifdef _BATTLE_PK
|
||||
{ {"ITEM_BattlePK"}, ITEM_BattlePK, 0 },
|
||||
#endif
|
||||
#ifdef _SILENTZERO
|
||||
{ {"ITEM_SetSilentZero"}, ITEM_SetSilentZero, 0 },
|
||||
#endif
|
||||
#ifdef _PET_LEVEL_ITEM
|
||||
{ {"ITEM_PetLevelItem"}, ITEM_PetLevelItem, 0 },
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_EFMETAMO
|
||||
{ {"ITEM_efMetamo"}, ITEM_efMetamo, 0 },
|
||||
#endif
|
||||
#ifdef _PET_BEATITUDE
|
||||
{ {"PET_BEATITUDE"}, PET_BEATITUDE, 0 },
|
||||
#endif
|
||||
#ifdef _GET_MULTI_ITEM
|
||||
{ {"ITEM_GetMultiItem"}, ITEM_GetMultiItem, 0 },
|
||||
#endif
|
||||
{ {"ITEM_OldToNew"}, ITEM_OldToNew, 0 },
|
||||
#ifdef _SAFE_PASSWORD
|
||||
{ {"ITEM_ItemPetLocked"}, ITEM_ItemPetLocked, 0 },
|
||||
#endif
|
||||
#ifdef _POINT_CARD
|
||||
{ {"ITEM_OnlineCost"}, ITEM_OnlineCost, 0 },
|
||||
#endif
|
||||
#ifdef _SUPER_MAN_ITEM
|
||||
{ {"ITEM_SuperManItem"}, ITEM_SuperManItem, 0 },
|
||||
#endif
|
||||
{ {"ITEM_CharSave"}, ITEM_CharSave, 0 },
|
||||
{ {"ITEM_NoDelWarp"}, ITEM_NoDelWarp, 0 },
|
||||
{ {"ITEM_RandWarp"}, ITEM_RandWarp, 0 },
|
||||
{ {"ITEM_RandMsg"}, ITEM_RandMsg, 0 },
|
||||
#ifdef _SQL_BUY_FUNC
|
||||
{ {"ITEM_OnlineBuy_recv"}, ITEM_OnlineBuy_recv, 0 },
|
||||
#endif
|
||||
#ifdef _JOB_AUTOPK
|
||||
{ {"ITEM_JobPk"}, ITEM_JobPk, 0 },
|
||||
#endif
|
||||
{ {"ITEM_SeeEquip"}, ITEM_SeeEquip, 0 },
|
||||
#ifdef _VIGOR_SYS
|
||||
{ {"ITEM_VigorSave"}, ITEM_VigorSave, 0 },
|
||||
#endif
|
||||
#ifdef _EV_NUM
|
||||
{ {"ITEM_EvItem"}, ITEM_EvItem, 0 },
|
||||
#endif
|
||||
#ifdef _OFFLINE_SYSTEM
|
||||
{ {"ITEM_OFFLINE"}, ITEM_OFFLINE, 0 },
|
||||
#endif
|
||||
{ {"ITEM_AddProfessionLevel"}, ITEM_AddProfessionLevel, 0 },
|
||||
#ifdef _ZHIPIAO_SYSTEM
|
||||
{ {"ITEM_ZhiPiao"}, ITEM_ZhiPiao, 0 },
|
||||
#endif
|
||||
{ {"ITEM_useRandEditBase"}, ITEM_useRandEditBase, 0 },
|
||||
#ifdef _DP_ZHIPIAO_ITEM
|
||||
{ {"ITEM_DpZhiPiao"}, ITEM_DpZhiPiao, 0 },
|
||||
#endif
|
||||
{ {"ITEM_UpPointResetItem"}, ITEM_UpPointResetItem, 0 },
|
||||
{ {"ITEM_MM"}, ITEM_MM, 0 },
|
||||
#ifdef _XC_CANGKU
|
||||
{ {"ITEM_ICK"}, ITEM_ICK, 0 },
|
||||
{ {"ITEM_PCK"}, ITEM_PCK, 0 },
|
||||
#endif
|
||||
#ifdef _SPECIAL_SUIT
|
||||
{ {"ITEM_SpecialSuitEquip"}, ITEM_SpecialSuitEquip, 0 },
|
||||
{ {"ITEM_SpecialResuitEquip"}, ITEM_SpecialResuitEquip, 0 },
|
||||
#endif
|
||||
#ifdef _NULL_CHECK_ITEM
|
||||
{ {"ITEM_NullCheck"}, ITEM_NullCheck, 0 },
|
||||
#endif
|
||||
#ifdef _MANOR_EQUIP
|
||||
{ {"ITEM_ManorEquip"}, ITEM_ManorEquip, 0 },
|
||||
{ {"ITEM_ReManorEquip"}, ITEM_ReManorEquip, 0 },
|
||||
#endif
|
||||
{ {"ITEM_MakePet"}, ITEM_MakePet, 0 },
|
||||
{ {"PET_OTHERBEATITUDE"}, PET_OTHERBEATITUDE, 0 },
|
||||
{ {"PET_MYBEATITUDE"}, PET_MYBEATITUDE, 0 },
|
||||
{ {"ITEM_useExpLv"}, ITEM_useExpLv, 0 },
|
||||
#ifdef _ITEM_LUA
|
||||
{ {"ITEM_Lua"}, ITEM_Lua, 0 },
|
||||
#endif
|
||||
#ifdef _JZ_NEWSCRIPT_LUA
|
||||
{ {FUNCNAME_INITCALLBACK} , NPC_Lua_InitCallBack, 0 },
|
||||
{ {FUNCNAME_WALKPRECALLBACK} , NPC_Lua_WalkPreCallBack, 0 },
|
||||
{ {FUNCNAME_WALKPOSTCALLBACK} , NPC_Lua_WalkPostCallBack, 0 },
|
||||
{ {FUNCNAME_PREOVERCALLBACK} , NPC_Lua_PreOverCallBack, 0 },
|
||||
{ {FUNCNAME_POSTOVERCALLBACK} , NPC_Lua_PostOverCallBack, 0 },
|
||||
{ {FUNCNAME_WATCHCALLBACK} , NPC_Lua_WatchCallBack, 0 },
|
||||
{ {FUNCNAME_LOOPCALLBACK} , NPC_Lua_LoopCallBack, 0 },
|
||||
{ {FUNCNAME_TALKEDCALLBACK} , NPC_Lua_TalkedCallBack, 0 },
|
||||
{ {FUNCNAME_OFFCALLBACK} , NPC_Lua_OFFCallBack, 0 },
|
||||
{ {FUNCNAME_LOOKEDCALLBACK} , NPC_Lua_LookedCallBack, 0 },
|
||||
{ {FUNCNAME_ITEMPUTCALLBACK} , NPC_Lua_ItemPutCallBack, 0 },
|
||||
{ {FUNCNAME_WINDOWTALKEDCALLBACK} , NPC_Lua_WindowTalkedCallBack, 0 },
|
||||
#ifdef _USER_CHARLOOPS
|
||||
{ {FUNCNAME_CHARLOOPSCALLBACK} , NPC_Lua_CharLoopsCallBack, 0 },
|
||||
{ {FUNCNAME_BATTLEPROPERTYCALLBACK} , NPC_Lua_BattleProPertyCallBack, 0 },
|
||||
#endif
|
||||
|
||||
{ {FUNCNAME_ITEMPEROVERCALLBACK} , NPC_Lua_ItemPerOverCallBack, 0 },
|
||||
{ {FUNCNAME_ITEMPOSTOVERCALLBACK} , NPC_Lua_ItemPostOverCallBack, 0 },
|
||||
{ {FUNCNAME_ITEMWATCHCALLBACK} , NPC_Lua_ItemWatchCallBack, 0 },
|
||||
{ {FUNCNAME_ITEMUSECALLBACK} , NPC_Lua_ItemUseCallBack, 0 },
|
||||
{ {FUNCNAME_ITEMATTACHCALLBACK} , NPC_Lua_ItemAttachCallBack, 0 },
|
||||
{ {FUNCNAME_ITEMDETACHCALLBACK} , NPC_Lua_ItemDetachCallBack, 0 },
|
||||
{ {FUNCNAME_ITEMDROPCALLBACK} , NPC_Lua_ItemDropCallBack, 0 },
|
||||
{ {FUNCNAME_ITEMPICKUPCALLBACK} , NPC_Lua_ItemPickUPCallBack, 0 },
|
||||
#ifdef _Item_ReLifeAct
|
||||
{ {FUNCNAME_ITEMDIERELIFECALLBACK} , NPC_Lua_ItemDieReLifeCallBack, 0 },
|
||||
#endif
|
||||
|
||||
{ {FUNCNAME_BATTLEWINCALLBACK} , NPC_Lua_BattleWinCallBack, 0 },
|
||||
{ {FUNCNAME_BATTLEENDCALLBACK} , NPC_Lua_BattleEndCallBack, 0 },
|
||||
#endif //_JZ_NEWSCRIPT_LUA
|
||||
};
|
||||
|
||||
BOOL initFunctionTable( void )
|
||||
{
|
||||
|
||||
int i;
|
||||
{
|
||||
char* strings[arraysizeof(correspondStringAndFunctionTable)];
|
||||
int stringnum=0;
|
||||
for( i=0 ; i<arraysizeof(correspondStringAndFunctionTable) ; i++ )
|
||||
strings[stringnum++] =
|
||||
correspondStringAndFunctionTable[i].functionName.string;
|
||||
if( ! checkStringsUnique( strings, stringnum , 1 ) ){
|
||||
fprint("Function Name Table is overlapped.\n" );
|
||||
fprint("It is not allowed\n");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
for(i = 0; i < arraysizeof(correspondStringAndFunctionTable) ; i ++ ){
|
||||
correspondStringAndFunctionTable[i].hashcode =
|
||||
hashpjw( correspondStringAndFunctionTable[i].
|
||||
functionName.string);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void* getFunctionPointerFromName( char* funcname )
|
||||
{
|
||||
int i;
|
||||
int hashcode;
|
||||
if( funcname == NULL || funcname[0] == '\0' ){
|
||||
return NULL;
|
||||
}
|
||||
hashcode = hashpjw( funcname );
|
||||
for( i=0 ; i<arraysizeof(correspondStringAndFunctionTable) ; i++ )
|
||||
if( correspondStringAndFunctionTable[i].hashcode == hashcode )
|
||||
if( strcmp( correspondStringAndFunctionTable[i].functionName.string,funcname ) == 0 ){
|
||||
return correspondStringAndFunctionTable[i].functionPointer;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
print("No such Function: %s\n" ,funcname );
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
9
genver
Normal file
9
genver
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
IN=./include/version.h
|
||||
OUT=./genver.h
|
||||
touch main.c
|
||||
echo "char *genver=\"" > $OUT
|
||||
cat $IN | grep -e "^#define" | cut -b 9- | sed "s/\"/\'/g" | \
|
||||
sed 's/\\/\\\\/g' >> $OUT
|
||||
echo "<<Generated at "`date`">>" >> $OUT
|
||||
echo "by : Áúzoro¹¤×÷ÊÒ\n\";" >> $OUT
|
9
genver.sh
Normal file
9
genver.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
IN=./include/version.h
|
||||
OUT=./genver.h
|
||||
touch main.c
|
||||
echo "char *genver=\"" > $OUT
|
||||
cat $IN | grep -e "^#define" | cut -b 9- | sed "s/\"/\'/g" | \
|
||||
sed 's/\\/\\\\/g' >> $OUT
|
||||
echo "<<Generated at "`date`">>" >> $OUT
|
||||
echo "by : Áúzoro¹¤×÷ÊÒ\n\";" >> $OUT
|
281
handletime.c
Normal file
281
handletime.c
Normal file
@ -0,0 +1,281 @@
|
||||
#define __HANDLETIME_C__
|
||||
#include "version.h"
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "handletime.h"
|
||||
|
||||
#define LSTIME_SECONDS_PER_DAY 5400 /* LSTIME域 少氏及蜇 及 醒 */
|
||||
|
||||
|
||||
#define LSTIME_HOURS_PER_DAY 1024 /* LSTIME域 少氏及LSTIME及凛棉醒 */
|
||||
#define LSTIME_DAYS_PER_YEAR 100 /* LSTIME域 少氏及LSTIME及 醒 */
|
||||
|
||||
|
||||
/*
|
||||
// Nuke 0701: localtime
|
||||
|
||||
struct timeval NowTime;
|
||||
#ifdef localtime
|
||||
#undef localtime
|
||||
#endif
|
||||
|
||||
struct tm *localtime(const time_t *timep)
|
||||
{
|
||||
static struct tm lt;
|
||||
memset(<,0,sizeof(lt));
|
||||
lt.tm_sec=*timep %60;
|
||||
lt.tm_min=(*timep %3600) / 60;
|
||||
lt.tm_hour=(*timep % 86400) / 3600;
|
||||
return <
|
||||
}
|
||||
*/
|
||||
|
||||
/*------------------------------------------------------------
|
||||
* 娄醒
|
||||
* 卅仄
|
||||
* 忒曰袄
|
||||
------------------------------------------------------------*/
|
||||
BOOL setNewTime( void )
|
||||
{
|
||||
if( gettimeofday( &NowTime, (struct timezone*)NULL) != 0 ) {
|
||||
NowTime.tv_sec = time(0);
|
||||
// Nuke 0701: Localtime down
|
||||
print("\n time err !! \n");
|
||||
return FALSE;
|
||||
}
|
||||
NowTime.tv_sec += DEBUG_ADJUSTTIME;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
*******************************************************************/
|
||||
static long era = (long)912766409 + 5400;
|
||||
/* SA及啃卞内日仄凶 */
|
||||
void RealTimeToLSTime(long t , LSTIME *lstime)
|
||||
{
|
||||
long lsseconds = t - era; /* LS葭 井日及 醒 */
|
||||
long lsdays; /* LS葭 井日及 醒 */
|
||||
|
||||
lstime->year = (int)( lsseconds/(LSTIME_SECONDS_PER_DAY*LSTIME_DAYS_PER_YEAR) );
|
||||
|
||||
lsdays = lsseconds/LSTIME_SECONDS_PER_DAY;/* 引内葭 井日及 醒毛煌遥仄化 */
|
||||
lstime->day = lsdays % LSTIME_DAYS_PER_YEAR;/* 癫凶曰及 醒匹喃匀凶丐引曰互 */
|
||||
|
||||
|
||||
lstime->hour = (int)(lsseconds % LSTIME_SECONDS_PER_DAY )
|
||||
* LSTIME_HOURS_PER_DAY / LSTIME_SECONDS_PER_DAY;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
LS凛棉井日穴扑件凛棉卞允月
|
||||
*******************************************************************/
|
||||
void LSTimeToRealTime( LSTIME *lstime, long *t)
|
||||
{
|
||||
*t=(long)(
|
||||
( lstime->hour*LSTIME_DAYS_PER_YEAR+lstime->day) /* 凛棉 */
|
||||
*LSTIME_HOURS_PER_DAY
|
||||
|
||||
+ lstime->year)
|
||||
|
||||
|
||||
*450;
|
||||
return;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*******************************************************************/
|
||||
LSTIME_SECTION getLSTime (LSTIME *lstime)
|
||||
{
|
||||
if (NIGHT_TO_MORNING < lstime->hour
|
||||
&& lstime->hour <= MORNING_TO_NOON)
|
||||
return LS_MORNING;
|
||||
else if(NOON_TO_EVENING < lstime->hour
|
||||
&& lstime->hour <= EVENING_TO_NIGHT)
|
||||
return LS_EVENING;
|
||||
else if(EVENING_TO_NIGHT < lstime->hour
|
||||
&& lstime->hour <= NIGHT_TO_MORNING)
|
||||
return LS_NIGHT;
|
||||
else
|
||||
return LS_NOON;
|
||||
}
|
||||
|
||||
|
||||
#ifdef _ASSESS_SYSEFFICACY
|
||||
static clock_t TotalClock = 0;
|
||||
static clock_t StartClock = 0;
|
||||
//static int EndClock = 0;
|
||||
//static float SysTime=0.0;
|
||||
static clock_t EndClock = 0;
|
||||
static double SysTime=0.0;
|
||||
static int Cnum = 0;
|
||||
|
||||
#ifdef _ASSESS_SYSEFFICACY_SUB
|
||||
static clock_t Net_TotalClock = 0;
|
||||
static clock_t NPCGEN_TotalClock = 0;
|
||||
static clock_t Battle_TotalClock = 0;
|
||||
static clock_t Char_TotalClock = 0;
|
||||
static clock_t Petmail_TotalClock = 0;
|
||||
static clock_t Family_TotalClock = 0;
|
||||
static clock_t SaveCheck_TotalClock = 0;
|
||||
static clock_t GMBroadCast_TotalClock = 0;
|
||||
static double Net_SysTime=0.0;
|
||||
static double NPCGEN_SysTime=0.0;
|
||||
static double Battle_SysTime=0.0;
|
||||
static double Char_SysTime=0.0;
|
||||
static double Petmail_SysTime=0.0;
|
||||
static double Family_SysTime=0.0;
|
||||
static double SaveCheck_SysTime=0.0;
|
||||
static double GMBroadCast_SysTime=0.0;
|
||||
static clock_t SubStartClock = 0;
|
||||
#endif
|
||||
|
||||
void Assess_InitSysEfficacy()
|
||||
{
|
||||
TotalClock = 0;
|
||||
StartClock = 0;
|
||||
EndClock = 0;
|
||||
#ifdef _ASSESS_SYSEFFICACY_SUB
|
||||
Net_TotalClock = 0;
|
||||
NPCGEN_TotalClock = 0;
|
||||
Battle_TotalClock = 0;
|
||||
Char_TotalClock = 0;
|
||||
Petmail_TotalClock = 0;
|
||||
Family_TotalClock = 0;
|
||||
SaveCheck_TotalClock = 0;
|
||||
GMBroadCast_TotalClock = 0;
|
||||
|
||||
SubStartClock = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void Assess_SysEfficacy( int flg)
|
||||
{
|
||||
if( flg == 0 ){
|
||||
StartClock=clock();
|
||||
}else if( flg == 1 ){
|
||||
EndClock = clock();
|
||||
if( EndClock < StartClock ) return;
|
||||
TotalClock += (int)(EndClock-StartClock);
|
||||
Cnum++;
|
||||
if( Cnum%500 == 0 ){
|
||||
SysTime = (float)(TotalClock/Cnum)/CLOCKS_PER_SEC;
|
||||
TotalClock = 0;
|
||||
#ifdef _ASSESS_SYSEFFICACY_SUB
|
||||
Net_SysTime = (float)(Net_TotalClock/Cnum)/CLOCKS_PER_SEC;
|
||||
Net_TotalClock = 0;
|
||||
NPCGEN_SysTime = (float)(NPCGEN_TotalClock/Cnum)/CLOCKS_PER_SEC;
|
||||
NPCGEN_TotalClock = 0;
|
||||
Battle_SysTime = (float)(Battle_TotalClock/Cnum)/CLOCKS_PER_SEC;
|
||||
Battle_TotalClock = 0;
|
||||
Char_SysTime = (float)(Char_TotalClock/Cnum)/CLOCKS_PER_SEC;
|
||||
Char_TotalClock = 0;
|
||||
Petmail_SysTime = (float)(Petmail_TotalClock/Cnum)/CLOCKS_PER_SEC;
|
||||
Petmail_TotalClock = 0;
|
||||
Family_SysTime = (float)(Family_TotalClock/Cnum)/CLOCKS_PER_SEC;
|
||||
Family_TotalClock = 0;
|
||||
SaveCheck_SysTime = (float)(SaveCheck_TotalClock/Cnum)/CLOCKS_PER_SEC;
|
||||
SaveCheck_TotalClock = 0;
|
||||
GMBroadCast_SysTime = (float)(GMBroadCast_TotalClock/Cnum)/CLOCKS_PER_SEC;
|
||||
GMBroadCast_TotalClock = 0;
|
||||
#endif
|
||||
Cnum = 0;
|
||||
}
|
||||
}
|
||||
/*
|
||||
EndClock = clock();
|
||||
if( StartClock != 0 ){
|
||||
if( EndClock < StartClock ) return;
|
||||
TotalClock += (int)(EndClock-StartClock);
|
||||
Cnum++;
|
||||
if( Cnum%500 == 0 ){
|
||||
SysTime = (float)TotalClock/Cnum;
|
||||
TotalClock = 0;
|
||||
}
|
||||
}
|
||||
StartClock = EndClock;
|
||||
*/
|
||||
}
|
||||
|
||||
void ASSESS_getSysEfficacy( float *TVsec)
|
||||
{
|
||||
*TVsec = SysTime;
|
||||
}
|
||||
|
||||
#ifdef _ASSESS_SYSEFFICACY_SUB
|
||||
void Assess_SysEfficacy_sub( int flg, int loop)
|
||||
{
|
||||
|
||||
if( flg == 0 ){
|
||||
SubStartClock = clock();
|
||||
}else if( flg == 1 ){
|
||||
EndClock = clock();
|
||||
if( EndClock < SubStartClock ) return;
|
||||
|
||||
switch( loop) {
|
||||
case 1: // Net_TotalClock
|
||||
Net_TotalClock += (int)(EndClock-SubStartClock);
|
||||
break;
|
||||
case 2: // NPCGEN_TotalClock
|
||||
NPCGEN_TotalClock += (int)(EndClock-SubStartClock);
|
||||
break;
|
||||
case 3: // Battle_TotalClock
|
||||
Battle_TotalClock += (int)(EndClock-SubStartClock);
|
||||
break;
|
||||
case 4: // Char_TotalClock
|
||||
Char_TotalClock += (int)(EndClock-SubStartClock);
|
||||
break;
|
||||
case 5: // Petmail_TotalClock
|
||||
Petmail_TotalClock += (int)(EndClock-SubStartClock);
|
||||
break;
|
||||
case 6: // Family_TotalClock
|
||||
Family_TotalClock += (int)(EndClock-SubStartClock);
|
||||
break;
|
||||
case 7: // SaveCheck_TotalClock
|
||||
SaveCheck_TotalClock += (int)(EndClock-SubStartClock);
|
||||
break;
|
||||
case 8: // GMBroadCast_TotalClock
|
||||
GMBroadCast_TotalClock += (int)(EndClock-SubStartClock);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ASSESS_getSysEfficacy_sub( float *TVsec, int loop_index)
|
||||
{
|
||||
switch( loop_index) {
|
||||
case 1:
|
||||
*TVsec = Net_SysTime;
|
||||
break;
|
||||
case 2:
|
||||
*TVsec = NPCGEN_SysTime;
|
||||
break;
|
||||
case 3:
|
||||
*TVsec = Battle_SysTime;
|
||||
break;
|
||||
case 4:
|
||||
*TVsec = Char_SysTime;
|
||||
break;
|
||||
case 5:
|
||||
*TVsec = Petmail_SysTime;
|
||||
break;
|
||||
case 6:
|
||||
*TVsec = Family_SysTime;
|
||||
break;
|
||||
case 7:
|
||||
*TVsec = SaveCheck_SysTime;
|
||||
break;
|
||||
case 8:
|
||||
*TVsec = GMBroadCast_SysTime;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
45
include/addressbook.h
Normal file
45
include/addressbook.h
Normal file
@ -0,0 +1,45 @@
|
||||
#ifndef __ADDRESSBOOK_H__
|
||||
#define __ADDRESSBOOK_H__
|
||||
|
||||
#include "common.h"
|
||||
#include "util.h"
|
||||
#include "net.h"
|
||||
|
||||
#define ADDRESSBOOK_MAX 80
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int use;
|
||||
BOOL online; /* 锹澎平乓仿互扔□田 卞中凶日TRUE,
|
||||
公丹匹卅井匀凶日FALSE */
|
||||
int level; /* 锹澎平乓仿及伊矛伙 */
|
||||
int duelpoint; /* duelpoint*/
|
||||
int graphicsno; /* 锹澎平乓仿及 飓 寞 */
|
||||
char cdkey[CDKEYLEN]; /* CD 瓜件田□ */
|
||||
char charname[CHARNAMELEN]; /* 锹澎平乓仿及 蟆 */
|
||||
int transmigration; /* 鳖戏荚醒 */
|
||||
|
||||
} ADDRESSBOOK_entry;
|
||||
|
||||
|
||||
|
||||
|
||||
char *ADDRESSBOOK_makeAddressbookString( ADDRESSBOOK_entry *a );
|
||||
BOOL ADDRESSBOOK_makeAddressbookEntry( char *in , ADDRESSBOOK_entry *a );
|
||||
BOOL ADDRESSBOOK_deleteEntry( int meindex ,int index );
|
||||
BOOL ADDRESSBOOK_addEntry( int meindex );
|
||||
BOOL ADDRESSBOOK_sendAddressbookTable( int cindex );
|
||||
BOOL ADDRESSBOOK_sendAddressbookTableOne( int cindex, int num );
|
||||
BOOL ADDRESSBOOK_sendMessage( int cindex, int aindex , char *text ,
|
||||
int color );
|
||||
BOOL ADDRESSBOOK_sendMessage_FromOther( char *fromcdkey, char *fromcharaname,
|
||||
char *tocdkey, char *tocharaname,
|
||||
char* text , int color );
|
||||
|
||||
void ADDRESSBOOK_notifyLoginLogout( int cindex , int flg );
|
||||
void ADDRESSBOOK_addAddressBook( int meindex, int toindex);
|
||||
void ADDRESSBOOK_DispatchMessage( char *cd, char *nm, char *value, int mode);
|
||||
int ADDRESSBOOK_getIndexInAddressbook(int cindex , char *cdkey, char *charname);
|
||||
BOOL ADDRESSBOOK_AutoaddAddressBook( int meindex, int toindex);
|
||||
|
||||
#endif
|
1006
include/anim_tbl.h
Normal file
1006
include/anim_tbl.h
Normal file
File diff suppressed because it is too large
Load Diff
6
include/attestation.h
Normal file
6
include/attestation.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef __ATTESTATION_H__
|
||||
#define __ATTESTATION_H__
|
||||
|
||||
int attestation( void );
|
||||
|
||||
#endif
|
57
include/autil.h
Normal file
57
include/autil.h
Normal file
@ -0,0 +1,57 @@
|
||||
#include "version.h"
|
||||
#include "common.h"
|
||||
|
||||
#ifndef __UTIL_H_
|
||||
#define __UTIL_H_
|
||||
|
||||
|
||||
#define SLICE_MAX 20
|
||||
#define SLICE_SIZE 65500
|
||||
|
||||
extern char *MesgSlice[SLICE_MAX];
|
||||
extern int SliceCount; // count slices in MesgSlice
|
||||
|
||||
extern char PersonalKey[4096];
|
||||
|
||||
#define DEFAULTTABLE \
|
||||
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz{}"
|
||||
#define DEFAULTFUNCBEGIN "&"
|
||||
#define DEFAULTFUNCEND "#"
|
||||
|
||||
BOOL util_Init(void);
|
||||
|
||||
// WON ADD
|
||||
//void util_SplitMessage(char *source, char *separator);
|
||||
BOOL util_SplitMessage(char *source, char *separator);
|
||||
|
||||
|
||||
void util_EncodeMessage(char *dst, char *src);
|
||||
void util_DecodeMessage(char *dst, char *src);
|
||||
int util_GetFunctionFromSlice(int *func, int *fieldcount);
|
||||
void util_DiscardMessage(void);
|
||||
#define util_SendMesg( fd, func, buffer) _util_SendMesg( __FILE__, __LINE__, fd, func, buffer)
|
||||
void _util_SendMesg(char *file, int line, int fd, int func, char *buffer);
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Encoding function units. Use in Encrypting functions.
|
||||
int util_256to64(char *dst, char *src, int len, char *table);
|
||||
int util_64to256(char *dst, char *src, char *table);
|
||||
int util_256to64_shr(char *dst, char *src, int len, char *table, char *key);
|
||||
int util_shl_64to256(char *dst, char *src, char *table, char *key);
|
||||
int util_256to64_shl(char *dst, char *src, int len, char *table, char *key);
|
||||
int util_shr_64to256(char *dst, char *src, char *table, char *key);
|
||||
|
||||
void util_swapint(int *dst, int *src, char *rule);
|
||||
void util_xorstring(char *dst, char *src);
|
||||
void util_shrstring(char *dst, char *src, int offs);
|
||||
void util_shlstring(char *dst, char *src, int offs);
|
||||
// -------------------------------------------------------------------
|
||||
// Encrypting functions
|
||||
int util_deint(int fd,int sliceno, int *value);
|
||||
int util_mkint(int fd,char *buffer, int value);
|
||||
int util_destring(int fd,int sliceno, char *value);
|
||||
int util_mkstring(int fd,char *buffer, char *value);
|
||||
#ifdef _FIX_LSSP_S_BUG
|
||||
int is_digit(char *str);
|
||||
#endif
|
||||
#endif
|
788
include/battle.h
Normal file
788
include/battle.h
Normal file
@ -0,0 +1,788 @@
|
||||
#ifndef __BATTLE_H__
|
||||
#define __BATTLE_H__
|
||||
#include "net.h"
|
||||
|
||||
#ifdef _ALLBLUES_LUA_1_4
|
||||
#include "lua.h"
|
||||
#include "lauxlib.h"
|
||||
#include "lualib.h"
|
||||
#endif
|
||||
|
||||
#define BATTLE_ENTRY_MAX 10
|
||||
#define BATTLE_PLAYER_MAX 5
|
||||
#define SIDE_OFFSET 10
|
||||
|
||||
#define BATTLE_STRING_MAX 4096
|
||||
#define BATTLE_TIME_LIMIT (60*60)
|
||||
|
||||
|
||||
#define DUELPOINT_RATE (0.1)
|
||||
|
||||
enum{
|
||||
BATTLE_MODE_NONE = 0, // 无战斗状态
|
||||
BATTLE_MODE_INIT, // 战斗初始化
|
||||
BATTLE_MODE_BATTLE, // 战斗中
|
||||
BATTLE_MODE_FINISH, // 战斗结束
|
||||
BATTLE_MODE_STOP, // 战斗结束(未使用)
|
||||
BATTLE_MODE_WATCHBC, // 观战初始化
|
||||
BATTLE_MODE_WATCHPRE, // 观战(没作用)
|
||||
BATTLE_MODE_WATCHWAIT, // 观战(没作用)
|
||||
BATTLE_MODE_WATCHMOVIE, // 观战(没作用)
|
||||
BATTLE_MODE_WATCHAFTER, // 观战(没作用)
|
||||
BATTLE_MODE_END
|
||||
};
|
||||
|
||||
|
||||
enum{
|
||||
BATTLE_TYPE_NONE = 0,
|
||||
BATTLE_TYPE_P_vs_E = 1,
|
||||
BATTLE_TYPE_P_vs_P = 2,
|
||||
BATTLE_TYPE_E_vs_E = 3,
|
||||
BATTLE_TYPE_WATCH = 4,
|
||||
BATTLE_TYPE_DP_BATTLE = 5,
|
||||
BATTLE_TYPE_BOSS_BATTLE = 6,
|
||||
BATTLE_TYPE_END
|
||||
};
|
||||
|
||||
|
||||
enum{
|
||||
BATTLE_CHARMODE_NONE = 0, // 无战斗状态
|
||||
BATTLE_CHARMODE_INIT, // 战斗初始化
|
||||
BATTLE_CHARMODE_C_WAIT, // 等待战斗指令
|
||||
BATTLE_CHARMODE_C_OK, // 已输入战斗指令
|
||||
BATTLE_CHARMODE_BATTLE, // 未使用
|
||||
BATTLE_CHARMODE_RESCUE, // 由help状态进入的
|
||||
BATTLE_CHARMODE_FINAL, // 战斗结束
|
||||
BATTLE_CHARMODE_WATCHINIT, // 观战初始化
|
||||
BATTLE_CHARMODE_COMMAND, // 未使用
|
||||
BATTLE_CHARMODE_END
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum{
|
||||
BATTLE_ERR_NONE = 0,
|
||||
BATTLE_ERR_NOTASK,
|
||||
BATTLE_ERR_NOUSE,
|
||||
BATTLE_ERR_PARAM,
|
||||
BATTLE_ERR_ENTRYMAX,
|
||||
BATTLE_ERR_TYPE,
|
||||
BATTLE_ERR_CHARAINDEX,
|
||||
BATTLE_ERR_BATTLEINDEX,
|
||||
BATTLE_ERR_NOENEMY,
|
||||
BATTLE_ERR_ALREADYBATTLE,
|
||||
BATTLE_ERR_SAMEPARTY,
|
||||
BATTLE_ERR_END
|
||||
}BATTLE_ERR;
|
||||
|
||||
|
||||
enum{
|
||||
BATTLE_S_TYPE_PLAYER = 0,
|
||||
BATTLE_S_TYPE_ENEMY,
|
||||
BATTLE_S_TYPE_END
|
||||
};
|
||||
|
||||
|
||||
typedef enum{
|
||||
BATTLE_COM_NONE,
|
||||
BATTLE_COM_ATTACK,
|
||||
BATTLE_COM_GUARD,
|
||||
BATTLE_COM_CAPTURE,
|
||||
BATTLE_COM_ESCAPE,
|
||||
BATTLE_COM_PETIN,
|
||||
BATTLE_COM_PETOUT,
|
||||
BATTLE_COM_ITEM,
|
||||
BATTLE_COM_BOOMERANG,
|
||||
BATTLE_COM_COMBO,
|
||||
BATTLE_COM_COMBOEND,
|
||||
BATTLE_COM_WAIT,
|
||||
|
||||
BATTLE_COM_SEKIBAN = 1000,
|
||||
BATTLE_COM_S_RENZOKU,
|
||||
BATTLE_COM_S_GBREAK,
|
||||
BATTLE_COM_S_GUARDIAN_ATTACK,
|
||||
BATTLE_COM_S_GUARDIAN_GUARD,
|
||||
BATTLE_COM_S_CHARGE,
|
||||
BATTLE_COM_S_MIGHTY,
|
||||
BATTLE_COM_S_POWERBALANCE,
|
||||
BATTLE_COM_S_STATUSCHANGE,
|
||||
BATTLE_COM_S_EARTHROUND0,
|
||||
BATTLE_COM_S_EARTHROUND1,
|
||||
BATTLE_COM_S_LOSTESCAPE,
|
||||
BATTLE_COM_S_ABDUCT,
|
||||
BATTLE_COM_S_STEAL,
|
||||
BATTLE_COM_S_NOGUARD,
|
||||
BATTLE_COM_S_CHARGE_OK,
|
||||
BATTLE_COM_JYUJYUTU = 2000,
|
||||
|
||||
BATTLE_COM_COMPELESCAPE, //强制离开
|
||||
|
||||
#ifdef _ATTACK_MAGIC
|
||||
BATTLE_COM_S_ATTACK_MAGIC, // 宠物魔法
|
||||
#endif
|
||||
|
||||
#ifdef _PSKILL_FALLGROUND
|
||||
BATTLE_COM_S_FALLRIDE, //落马术
|
||||
#endif
|
||||
#ifdef _PETSKILL_TIMID
|
||||
BATTLE_COM_S_TIMID,
|
||||
#endif
|
||||
#ifdef _PETSKILL_2TIMID
|
||||
BATTLE_COM_S_2TIMID,
|
||||
#endif
|
||||
#ifdef _PETSKILL_ANTINTER
|
||||
BATTLE_COM_S_ANTINTER,
|
||||
#endif
|
||||
#ifdef _PETSKILL_PROPERTY
|
||||
BATTLE_COM_S_PROPERTYSKILL,
|
||||
#endif
|
||||
#ifdef _PETSKILL_TEAR
|
||||
BATTLE_COM_S_PETSKILLTEAR,
|
||||
#endif
|
||||
#ifdef _BATTLE_LIGHTTAKE
|
||||
BATTLE_COM_S_LIGHTTAKE,
|
||||
#endif
|
||||
#ifdef _BATTLE_ATTCRAZED // ANDY 疯狂暴走
|
||||
BATTLE_COM_S_ATTCRAZED,
|
||||
#endif
|
||||
#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子
|
||||
BATTLE_COM_S_ATTSHOOT,
|
||||
#endif
|
||||
#ifdef _BATTLESTEAL_FIX
|
||||
BATTLE_COM_S_STEALMONEY,
|
||||
#endif
|
||||
#ifdef _PRO_BATTLEENEMYSKILL
|
||||
BATTLE_COM_S_ENEMYRELIFE, //NPC ENEMY 复活技能
|
||||
BATTLE_COM_S_ENEMYREHP, //NPC ENEMY 补血技能
|
||||
BATTLE_COM_S_ENEMYHELP, //NPC ENEMY 招人
|
||||
#endif
|
||||
#ifdef _SKILL_DAMAGETOHP
|
||||
BATTLE_COM_S_DAMAGETOHP, //嗜血技
|
||||
#endif
|
||||
#ifdef _Skill_MPDAMAGE
|
||||
BATTLE_COM_S_MPDAMAGE, //MP伤害
|
||||
#endif
|
||||
#ifdef _SKILL_WILDVIOLENT_ATT
|
||||
BATTLE_COM_S_WILDVIOLENTATTACK, //狂暴攻击 vincent add 2002/05/16
|
||||
#endif
|
||||
|
||||
#ifdef _SKILL_SPEEDY_ATT
|
||||
BATTLE_COM_S_SPEEDYATTACK, //疾速攻击 vincent add 2002/05/20
|
||||
#endif
|
||||
#ifdef _SKILL_GUARDBREAK2
|
||||
BATTLE_COM_S_GBREAK2, //破除防御2 vincent add 2002/05/20
|
||||
#endif
|
||||
#ifdef _SKILL_SACRIFICE
|
||||
BATTLE_COM_S_SACRIFICE, //救援 vincent add 2002/05/30
|
||||
#endif
|
||||
#ifdef _SKILL_WEAKEN
|
||||
BATTLE_COM_S_WEAKEN, //虚弱 vincent add 2002/07/11
|
||||
#endif
|
||||
#ifdef _SKILL_DEEPPOISON
|
||||
BATTLE_COM_S_DEEPPOISON, //剧毒 vincent add 2002/07/16
|
||||
#endif
|
||||
#ifdef _SKILL_BARRIER
|
||||
BATTLE_COM_S_BARRIER, //魔障 vincent add 2002/07/16
|
||||
#endif
|
||||
#ifdef _SKILL_NOCAST
|
||||
BATTLE_COM_S_NOCAST, //沉默 vincent add 2002/07/16
|
||||
#endif
|
||||
#ifdef _SKILL_ROAR
|
||||
BATTLE_COM_S_ROAR, //大吼 vincent add 2002/07/11
|
||||
#endif
|
||||
#ifdef _BATTLENPC_WARP_PLAYER
|
||||
BATTLE_COM_WARP, // npc warp player
|
||||
#endif
|
||||
#ifdef _SKILL_TOOTH
|
||||
BATTLE_COM_S_TOOTHCRUSHE,
|
||||
#endif
|
||||
#ifdef _PSKILL_MODIFY
|
||||
BATTLE_COM_S_MODIFYATT,
|
||||
#endif
|
||||
#ifdef _PSKILL_MDFYATTACK
|
||||
BATTLE_COM_S_MDFYATTACK,
|
||||
#endif
|
||||
#ifdef _MAGIC_SUPERWALL
|
||||
BATTLE_COM_S_SUPERWALL,
|
||||
#endif
|
||||
#ifdef _SKILL_REFRESH
|
||||
BATTLE_COM_S_REFRESH,
|
||||
#endif
|
||||
#ifdef _VARY_WOLF
|
||||
BATTLE_COM_S_VARY,
|
||||
#endif
|
||||
#ifdef _PETSKILL_SETDUCK
|
||||
BATTLE_COM_S_SETDUCK,
|
||||
#endif
|
||||
#ifdef _MAGICPET_SKILL
|
||||
BATTLE_COM_S_SETMAGICPET,
|
||||
#endif
|
||||
#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能
|
||||
|
||||
// 巫师
|
||||
BATTLE_COM_S_VOLCANO_SPRINGS, // 火山泉
|
||||
BATTLE_COM_S_FIRE_BALL, // 火星球
|
||||
BATTLE_COM_S_FIRE_SPEAR, // 火龙枪
|
||||
BATTLE_COM_S_SUMMON_THUNDER, // 召雷术
|
||||
BATTLE_COM_S_CURRENT, // 电流术
|
||||
BATTLE_COM_S_STORM, // 暴风雨
|
||||
BATTLE_COM_S_ICE_ARROW, // 冰箭术
|
||||
BATTLE_COM_S_ICE_CRACK, // 冰爆术
|
||||
BATTLE_COM_S_ICE_MIRROR, // 冰镜术
|
||||
BATTLE_COM_S_DOOM, // 世界末日
|
||||
BATTLE_COM_S_BLOOD, // 嗜血成性
|
||||
BATTLE_COM_S_BLOOD_WORMS, // 嗜血蛊
|
||||
BATTLE_COM_S_SIGN, // 一针见血
|
||||
BATTLE_COM_S_FIRE_ENCLOSE, // 火附体
|
||||
BATTLE_COM_S_ICE_ENCLOSE, // 冰附体
|
||||
BATTLE_COM_S_THUNDER_ENCLOSE, // 雷附体
|
||||
BATTLE_COM_S_ENCLOSE, // 附身术
|
||||
BATTLE_COM_S_TRANSPOSE, // 移形换位
|
||||
// 勇士
|
||||
BATTLE_COM_S_BRUST, // 爆击
|
||||
BATTLE_COM_S_CHAIN_ATK, // 连环攻击
|
||||
BATTLE_COM_S_AVOID, // 回避
|
||||
BATTLE_COM_S_RECOVERY, // 补血
|
||||
BATTLE_COM_S_WEAPON_FOCUS, // 武器专精
|
||||
BATTLE_COM_S_REBACK, // 状态回复
|
||||
BATTLE_COM_S_CHAIN_ATK_2, // 双重攻击
|
||||
BATTLE_COM_S_SCAPEGOAT, // 舍已为友
|
||||
BATTLE_COM_S_ENRAGE, // 激化攻击
|
||||
BATTLE_COM_S_COLLECT, // 能量聚集
|
||||
BATTLE_COM_S_FOCUS, // 专注战斗
|
||||
BATTLE_COM_S_SHIELD_ATTACK, // 盾击
|
||||
BATTLE_COM_S_DUAL_WEAPON, // 二刀流
|
||||
BATTLE_COM_S_DEFLECT, // 格档
|
||||
BATTLE_COM_S_THROUGH_ATTACK, // 贯穿攻击
|
||||
BATTLE_COM_S_CAVALRY, // 座骑攻击
|
||||
BATTLE_COM_S_DEAD_ATTACK, // 濒死攻击
|
||||
BATTLE_COM_S_CONVOLUTE, // 回旋攻击
|
||||
BATTLE_COM_S_CHAOS, // 混乱攻击
|
||||
// 猎人
|
||||
BATTLE_COM_S_TRAP, // 陷阱
|
||||
BATTLE_COM_S_TRACK, // 追寻敌踪
|
||||
BATTLE_COM_S_DOCILE, // 驯伏宠物
|
||||
BATTLE_COM_S_ENRAGE_PET, // 激怒宠物
|
||||
BATTLE_COM_S_DRAGNET, // 天罗地网
|
||||
BATTLE_COM_S_ENTWINE, // 树根缠绕
|
||||
BATTLE_COM_S_AUTARKY, // 自给自足
|
||||
BATTLE_COM_S_PLUNDER, // 体掠夺
|
||||
BATTLE_COM_S_TOXIN_WEAPON, // 毒素武器
|
||||
BATTLE_COM_S_RESIST_FIRE, // 火抗性提升
|
||||
BATTLE_COM_S_RESIST_ICE, // 冰抗性提升
|
||||
BATTLE_COM_S_RESIST_THUNDER, // 雷抗性提升
|
||||
BATTLE_COM_S_G_RESIST_FIRE, // 团体火抗性提升
|
||||
BATTLE_COM_S_G_RESIST_ICE, // 团体冰抗性提升
|
||||
BATTLE_COM_S_G_RESIST_THUNDER, // 团体雷抗性提升
|
||||
BATTLE_COM_S_ATTACK_WEAK, // 弱点攻击
|
||||
BATTLE_COM_S_INSTIGATE, // 挑拨
|
||||
BATTLE_COM_S_OBLIVION, // 遗忘
|
||||
#ifdef _PROFESSION_ADDSKILL
|
||||
BATTLE_COM_S_RESIST_F_I_T, // 自然威能
|
||||
BATTLE_COM_S_CALL_NATURE, // 号召自然
|
||||
BATTLE_COM_S_BOUNDARY, // 四属性结界
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延
|
||||
BATTLE_COM_S_SARS,
|
||||
#endif
|
||||
#ifdef _SONIC_ATTACK // WON ADD 音波攻击
|
||||
BATTLE_COM_S_SONIC,
|
||||
BATTLE_COM_S_SONIC2,
|
||||
#endif
|
||||
#ifdef _PETSKILL_REGRET
|
||||
BATTLE_COM_S_REGRET,
|
||||
BATTLE_COM_S_REGRET2,
|
||||
#endif
|
||||
#ifdef _PETSKILL_GYRATE
|
||||
BATTLE_COM_S_GYRATE,
|
||||
#endif
|
||||
#ifdef _PETSKILL_ACUPUNCTURE
|
||||
BATTLE_COM_S_ACUPUNCTURE,
|
||||
#endif
|
||||
#ifdef _PETSKILL_RETRACE
|
||||
BATTLE_COM_S_RETRACE,
|
||||
#endif
|
||||
#ifdef _PETSKILL_HECTOR
|
||||
BATTLE_COM_S_HECTOR,
|
||||
#endif
|
||||
#ifdef _PETSKILL_FIREKILL
|
||||
BATTLE_COM_S_FIREKILL,
|
||||
#endif
|
||||
#ifdef _PETSKILL_DAMAGETOHP
|
||||
BATTLE_COM_S_DAMAGETOHP2, //暗月狂狼(嗜血技的变体)
|
||||
#endif
|
||||
#ifdef _PETSKILL_BECOMEFOX
|
||||
BATTLE_COM_S_BECOMEFOX,
|
||||
#endif
|
||||
#ifdef _PETSKILL_BECOMEPIG
|
||||
BATTLE_COM_S_BECOMEPIG,
|
||||
#endif
|
||||
#ifdef _PETSKILL_SHOWMERCY
|
||||
BATTLE_COM_S_SHOWMERCY,
|
||||
#endif
|
||||
#ifdef _PETSKILL_LER
|
||||
BATTLE_COM_S_BAT_FLY, // 雷尔技 - 群蝠四窜
|
||||
BATTLE_COM_S_DIVIDE_ATTACK, // 雷尔技 - 分身地裂
|
||||
#endif
|
||||
#ifdef _PETSKILL_BATTLE_MODEL
|
||||
BATTLE_COM_S_BATTLE_MODEL, // 宠物技能战斗模组
|
||||
#endif
|
||||
BATTLE_COM_S_ZIYUN1,
|
||||
#ifdef _OFFLINE_SYSTEM
|
||||
BATTLE_COM_S_OFFLINE_RECOVERY,
|
||||
#endif
|
||||
|
||||
BATTLE_COM_END
|
||||
}BATTLE_COM;
|
||||
|
||||
|
||||
enum{
|
||||
BATTLE_RET_NORMAL,
|
||||
BATTLE_RET_CRITICAL,
|
||||
BATTLE_RET_MISS,
|
||||
BATTLE_RET_DODGE,
|
||||
BATTLE_RET_ALLGUARD,
|
||||
#ifdef _EQUIT_ARRANGE
|
||||
BATTLE_RET_ARRANGE,
|
||||
#endif
|
||||
BATTLE_RET_END
|
||||
}BATTLE_RET;
|
||||
|
||||
|
||||
#define BC_FLG_NEW (1<<0)
|
||||
#define BC_FLG_DEAD (1<<1)
|
||||
#define BC_FLG_PLAYER (1<<2)
|
||||
#define BC_FLG_POISON (1<<3)
|
||||
#define BC_FLG_PARALYSIS (1<<4)
|
||||
#define BC_FLG_SLEEP (1<<5)
|
||||
#define BC_FLG_STONE (1<<6)
|
||||
#define BC_FLG_DRUNK (1<<7)
|
||||
#define BC_FLG_CONFUSION (1<<8)
|
||||
#define BC_FLG_HIDE (1<<9)
|
||||
#define BC_FLG_REVERSE (1<<10)
|
||||
#ifdef _MAGIC_WEAKEN
|
||||
#define BC_FLG_WEAKEN (1<<11) // 虚弱
|
||||
#endif
|
||||
#ifdef _MAGIC_DEEPPOISON
|
||||
#define BC_FLG_DEEPPOISON (1<<12) // 剧毒
|
||||
#endif
|
||||
#ifdef _MAGIC_BARRIER
|
||||
#define BC_FLG_BARRIER (1<<13) // 魔障
|
||||
#endif
|
||||
#ifdef _MAGIC_NOCAST
|
||||
#define BC_FLG_NOCAST (1<<14) // 沉默
|
||||
#endif
|
||||
|
||||
#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延
|
||||
#define BC_FLG_SARS (1<<15) // 毒煞
|
||||
#endif
|
||||
|
||||
#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能
|
||||
#define BC_FLG_DIZZY (1<<16) // 晕眩
|
||||
#define BC_FLG_ENTWINE (1<<17) // 树根缠绕
|
||||
#define BC_FLG_DRAGNET (1<<18) // 天罗地网
|
||||
#define BC_FLG_ICECRACK (1<<19) // 冰爆术
|
||||
#define BC_FLG_OBLIVION (1<<20) // 遗忘
|
||||
#define BC_FLG_ICEARROW (1<<21) // 冰箭
|
||||
#define BC_FLG_BLOODWORMS (1<<22) // 嗜血蛊
|
||||
#define BC_FLG_SIGN (1<<23) // 一针见血
|
||||
#define BC_FLG_CARY (1<<24) // 挑拨
|
||||
#define BC_FLG_F_ENCLOSE (1<<25) // 火附体
|
||||
#define BC_FLG_I_ENCLOSE (1<<26) // 冰附体
|
||||
#define BC_FLG_T_ENCLOSE (1<<27) // 雷附体
|
||||
#ifdef _PROFESSION_ADDSKILL
|
||||
#define BC_FLG_WATER (1<<28) // 水附体
|
||||
#define BC_FLG_FEAR (1<<29) // 恐惧
|
||||
#endif
|
||||
#ifdef _PETSKILL_LER
|
||||
#define BC_FLG_CHANGE (1<<30) // 雷尔变身
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#define BP_FLG_JOIN (1<<0)
|
||||
#define BP_FLG_PLAYER_MENU_OFF (1<<1)
|
||||
#define BP_FLG_BOOMERANG (1<<2)
|
||||
#define BP_FLG_PET_MENU_OFF (1<<3)
|
||||
#define BP_FLG_ENEMY_SURPRISAL (1<<4)
|
||||
#define BP_FLG_PLAYER_SURPRISAL (1<<5)
|
||||
|
||||
|
||||
#define CHAR_BATTLEFLG_ULTIMATE (1<<0)
|
||||
#define CHAR_BATTLEFLG_AIBAD (1<<1)
|
||||
#define CHAR_BATTLEFLG_REVERSE (1<<2)
|
||||
#define CHAR_BATTLEFLG_GUARDIAN (1<<3)
|
||||
#define CHAR_BATTLEFLG_NORETURN (1<<4)
|
||||
#define CHAR_BATTLEFLG_RECOVERY (1<<5)
|
||||
#define CHAR_BATTLEFLG_ABIO (1<<6)
|
||||
#define CHAR_BATTLEFLG_NODUCK (1<<7)
|
||||
|
||||
#define GETITEM_MAX 3
|
||||
typedef struct
|
||||
{
|
||||
int attacker;
|
||||
}INVADER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int charaindex;
|
||||
int bid;
|
||||
int escape;
|
||||
int flg;
|
||||
int guardian;
|
||||
int duelpoint;
|
||||
int getitem[GETITEM_MAX];
|
||||
}BATTLE_ENTRY;
|
||||
#define BENT_FLG_ULTIMATE (1<<0)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int type;
|
||||
int flg;
|
||||
int common_dp;
|
||||
BATTLE_ENTRY Entry[BATTLE_ENTRY_MAX];
|
||||
}BATTLE_SIDE;
|
||||
|
||||
#define BSIDE_FLG_SURPRISE ( 1 << 0 )
|
||||
#define BSIDE_FLG_HELP_OK ( 1 << 1 )
|
||||
|
||||
#ifdef _ALLBLUES_LUA_1_4
|
||||
typedef enum
|
||||
{
|
||||
BATTLE_FINISH,
|
||||
BATTLE_ESCAPE,
|
||||
BATTLE_FUNCTABLENUM,
|
||||
}BATTLE_FUNCTABLE;
|
||||
#endif
|
||||
|
||||
//typedef struct _Battle
|
||||
//{
|
||||
// BOOL use; /* 银匀化中月井升丹井 */
|
||||
// int battleindex; /* 田玄伙 寞 */
|
||||
// int mode; /* 蜇箕及爵 乒□玉 */
|
||||
// int type; /* 爵 正奶皿 (0:骚橘)(1:DUEL)(2:示旦爵) */
|
||||
// int dpbattle; /* DP田玄伙井" */
|
||||
// int norisk; /* 韶氏匹手伉旦弁及 中田玄伙井" */
|
||||
// int turn; /* 正□件醒 */
|
||||
// int timer; /* 它巨奶玄羁卞银丹正奶穴 */
|
||||
// int leaderindex; /* 巨件市它件玄毛粟仇仄凶平乓仿及奶件犯永弁旦 */
|
||||
//#ifdef _AUTO_PK
|
||||
// char leadercdkey[CDKEYLEN];
|
||||
// char leadername[CHARNAMELEN];
|
||||
// int rivalindex;
|
||||
// char rivalcdkey[CDKEYLEN];
|
||||
// char rivalname[CHARNAMELEN];
|
||||
//#endif
|
||||
// int winside; /* 厍仄凶扔奶玉 */
|
||||
// int field_att; /* 白奴□伙玉及箪岭 */
|
||||
// int att_count; /* 白奴□伙玉及箪岭 祭 及正奶穴 */
|
||||
// int att_pow; /* 白奴□伙玉及箪岭 祭 及由伐□ */
|
||||
// int field_no;
|
||||
// int flg; /* 备潘白仿弘 */
|
||||
// BATTLE_SIDE Side[2];
|
||||
//#ifdef _BATTLE_TIMESPEED
|
||||
// unsigned int CreateTime;
|
||||
// unsigned int EndTime;
|
||||
// unsigned int PartTime;
|
||||
// int flgTime;
|
||||
//
|
||||
//#endif
|
||||
//
|
||||
//#ifdef _PROFESSION_ADDSKILL
|
||||
// //冰爆术存放
|
||||
// int ice_count;//暂存数量
|
||||
// int ice_bout[20];//回合计数
|
||||
// BOOL ice_use[20];//是否使用
|
||||
// int ice_toNo[20];//对象
|
||||
// int ice_level[20];//攻击力
|
||||
// int ice_array[20];
|
||||
// int ice_charaindex[20];
|
||||
// int ice_attackNo[20];
|
||||
//#endif
|
||||
//
|
||||
// int iEntryBack[BATTLE_ENTRY_MAX*2]; // 蟆正□件瓒 今木化中凶丢件田□
|
||||
// int iEntryBack2[BATTLE_ENTRY_MAX*2]; // 蟆正□件瓒 今木化中凶丢件田□
|
||||
// int createindex; /* 仇及爵 毛综曰请仄凶平乓仿奶件犯永弁旦(NPC卅升) */
|
||||
// int (*WinFunc)( int battleindex, int charaindex );
|
||||
// struct _Battle *pNext; // 戚及棋爵弘伙□皿
|
||||
// struct _Battle *pBefore; // 蟆及棋爵弘伙□皿
|
||||
//}BATTLE;
|
||||
|
||||
typedef struct _Battle
|
||||
{
|
||||
BOOL use; /* 银匀化中月井升丹井 */
|
||||
int battleindex; /* 田玄伙 寞 */
|
||||
int mode; /* 蜇箕及爵 乒□玉 */
|
||||
int type; /* 爵 正奶皿 (0:骚橘)(1:DUEL)(2:示旦爵) */
|
||||
int dpbattle; /* DP田玄伙井" */
|
||||
int norisk; /* 韶氏匹手伉旦弁及 中田玄伙井" */
|
||||
int turn; /*回合数*/
|
||||
int timer; /* 它巨奶玄羁卞银丹正奶穴 */
|
||||
int leaderindex; /* 巨件市它件玄毛粟仇仄凶平乓仿及奶件犯永弁旦 */
|
||||
#ifdef _AUTO_PK
|
||||
char leadercdkey[CDKEYLEN];
|
||||
char leadername[CHARNAMELEN];
|
||||
int rivalindex;
|
||||
char rivalcdkey[CDKEYLEN];
|
||||
char rivalname[CHARNAMELEN];
|
||||
#endif
|
||||
int BattleFloor; /* 厍仄凶扔奶玉 */
|
||||
int winside; /* 厍仄凶扔奶玉 */
|
||||
int field_att; /* 白奴□伙玉及箪岭 */
|
||||
int att_count; /* 白奴□伙玉及箪岭 祭 及正奶穴 */
|
||||
int att_pow; /* 白奴□伙玉及箪岭 祭 及由伐□ */
|
||||
int field_no;
|
||||
int flg; /* 备潘白仿弘 */
|
||||
BATTLE_SIDE Side[2];
|
||||
#ifdef _BATTLE_TIMESPEED
|
||||
unsigned int CreateTime;
|
||||
unsigned int EndTime;
|
||||
unsigned int PartTime;
|
||||
int flgTime;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _PROFESSION_ADDSKILL
|
||||
//冰爆术存放
|
||||
int ice_count;//暂存数量
|
||||
int ice_bout[20];//回合计数
|
||||
BOOL ice_use[20];//是否使用
|
||||
int ice_toNo[20];//对象
|
||||
int ice_level[20];//攻击力
|
||||
int ice_array[20];
|
||||
int ice_charaindex[20];
|
||||
int ice_attackNo[20];
|
||||
#endif
|
||||
|
||||
#ifdef _DEATH_CONTEND
|
||||
int menum;
|
||||
int tonum;
|
||||
#endif
|
||||
|
||||
#ifdef _ACTION_BULLSCR
|
||||
int enemynum;
|
||||
#endif
|
||||
int iEntryBack[BATTLE_ENTRY_MAX*2]; // 蟆正□件瓒 今木化中凶丢件田□
|
||||
int iEntryBack2[BATTLE_ENTRY_MAX*2]; // 蟆正□件瓒 今木化中凶丢件田□
|
||||
int createindex; /* 仇及爵 毛综曰请仄凶平乓仿奶件犯永弁旦(NPC卅升) */
|
||||
int (*WinFunc)( int battleindex, int charaindex );
|
||||
#ifdef _ALLBLUES_LUA_1_4
|
||||
lua_State *lua[BATTLE_FUNCTABLENUM];
|
||||
char *luafunctable[BATTLE_FUNCTABLENUM];
|
||||
#endif
|
||||
#ifdef _DEATH_CONTEND//计算胜败func
|
||||
int (*PkFunc)( int menum, int tonum, int winside, int battlemap);
|
||||
int battlemap;
|
||||
#endif
|
||||
struct _Battle *pNext; // 戚及棋爵弘伙□皿
|
||||
struct _Battle *pBefore; // 蟆及棋爵弘伙□皿
|
||||
/*#ifdef _JZ_NEWSCRIPT_LUA
|
||||
int (*BakFunc)( int battleindex, int charaindex );
|
||||
char BakLuaFuncName[32];
|
||||
#endif*/
|
||||
#ifdef _JZ_NEWSCRIPT_LUA
|
||||
int (*BakFunc)(int battleindex , int charaindex);
|
||||
int (*EndFunc)( int battleindex );
|
||||
char BakLuaFuncName[32];
|
||||
char EndLuaFuncName[32];
|
||||
#endif
|
||||
int floor;
|
||||
int battletime;
|
||||
}BATTLE;
|
||||
|
||||
|
||||
#define BATTLE_FLG_FREEDP ( 1 << 0 ) // 仆化手 蛹日卅中
|
||||
#define BATTLE_FLG_CHARALOST ( 1 << 1 ) // 平乓仿互韶氏分曰 仃凶曰仄化中月
|
||||
|
||||
|
||||
|
||||
enum{ // 晓及field_att 卞 木月袄
|
||||
BATTLE_ATTR_NONE = 0, // 箪岭
|
||||
BATTLE_ATTR_EARTH, // 哗
|
||||
BATTLE_ATTR_WATER, //
|
||||
BATTLE_ATTR_FIRE, // 绍
|
||||
BATTLE_ATTR_WIND, // 氘
|
||||
BATTLE_ATTR_END
|
||||
};
|
||||
|
||||
|
||||
//krynn 2001/12/28
|
||||
enum
|
||||
{
|
||||
BATTLE_SIDE_RIGHT, // 战斗中右侧 right side of battle
|
||||
BATTLE_SIDE_LEFT, // 战斗中左侧 left side of battle
|
||||
BATTLE_SIDE_WATCH, // 观战 watch battle player
|
||||
};
|
||||
//krynn end
|
||||
|
||||
#define TARGET_SIDE_0 20 // 惘础 扔奶玉ㄟ 隙烂
|
||||
#define TARGET_SIDE_1 21 // 尔础 扔奶玉ㄠ 隙烂
|
||||
#define TARGET_ALL 22 // 蝈 隙烂
|
||||
|
||||
#ifdef _ATTACK_MAGIC
|
||||
|
||||
#define TARGET_SIDE_0_B_ROW 26 // 右下後一列
|
||||
#define TARGET_SIDE_0_F_ROW 25 // 右下前一列
|
||||
#define TARGET_SIDE_1_F_ROW 24 // 左上前一列
|
||||
#define TARGET_SIDE_1_B_ROW 23 // 左上後一列
|
||||
|
||||
// won add
|
||||
#define TARGER_THROUGH 27
|
||||
|
||||
#endif
|
||||
|
||||
extern int gItemCrushRate; // 莽 犯白巧伙玄
|
||||
extern BATTLE *BattleArray; /* 爵 正旦弁 */
|
||||
extern int BATTLE_battlenum; /* 及醒 */
|
||||
extern char szAllBattleString[BATTLE_STRING_MAX]; /* 爵 卞银丹戊穴件玉 侬 */
|
||||
extern char *pszBattleTop, *pszBattleLast; /* 爵 卞银丹 侬 及匏 */
|
||||
extern char szBadStatusString[1024]; // 旦 □正旦唱橘迕 侬
|
||||
extern int gWeponType; // 蜇箕及 湛及潘
|
||||
extern float gDamageDiv; // 母丢□斥坌喃
|
||||
|
||||
#define BATTLE_CHECKINDEX( a ) ( ((a)>=BATTLE_battlenum || (a)<0 )?(FALSE):(TRUE) )
|
||||
#define BATTLE_CHECKSIDE( a ) ( ((a)>=2 || (a)<0)?(FALSE):( TRUE) )
|
||||
#define BATTLE_CHECKNO( a ) ( ((a)>=20 || (a)<0 )?(FALSE):(TRUE) )
|
||||
#define BATTLE_CHECKADDRESS( a ) ((&BattleArray[0])<=(a) && (a)<=(&BattleArray[BATTLE_battlenum-1] )?(TRUE):(FALSE) )
|
||||
|
||||
#define IsBATTLING( a ) (CHAR_getWorkInt((a),CHAR_WORKBATTLEMODE)?(TRUE):(FALSE))
|
||||
|
||||
#define STRCPY_TAIL( _pszTop, _pszLast, _szBuffer) { int _len = strlen( _szBuffer ); ( _pszTop + _len < (_pszLast)-1 )?( memcpy( _pszTop, _szBuffer, _len ), _pszTop += _len, _pszTop[0] = 0):(0); }
|
||||
|
||||
#define BATTLESTR_ADD( _szBuffer ){ int _len = strlen( _szBuffer ); ( pszBattleTop + _len < ( pszBattleLast)-1 )?( memcpy( pszBattleTop, _szBuffer, _len ), pszBattleTop += _len, pszBattleTop[0] = 0):(0); }
|
||||
|
||||
#define BATTLE_MAP_MAX 219
|
||||
|
||||
#define CH_FIX_PLAYERLEVELUP (+2) // 皿伊奶乩□及伊矛伙互失永皿
|
||||
#define CH_FIX_PLAYERDEAD (-2) // 皿伊奶乩□互骚橘韶
|
||||
#define CH_FIX_PLAYEULTIMATE (-4) // 皿伊奶乩□互失伙 奴丢永玄韶
|
||||
#define CH_FIX_PETESCAPE (-1) // 矢永玄互 仆凶
|
||||
|
||||
#define AI_FIX_PETLEVELUP (+5*100) // 矢永玄互伊矛伙失永皿
|
||||
#define AI_FIX_PETWIN (+1) // 矢永玄互衬毛逦仄凶
|
||||
#define AI_FIX_PETGOLDWIN (+2*10) // 矢永玄互伊矛伙及嫖中衬毛逦仄凶
|
||||
#define AI_FIX_PETRECOVERY (+10) // 爵 卞荚汊仄化手日匀凶
|
||||
#define AI_FIX_PETRESSURECT (+3*100) // 爵 卞汊唾仄化手日匀凶
|
||||
//#define AI_FIX_PETRECOVERY (+50) // 爵 卞荚汊仄化手日匀凶
|
||||
|
||||
#define AI_FIX_SEKKAN (-2*100) // 愤坌及矢永玄毛 猾
|
||||
#define AI_FIX_PLAYERULTIMATE (-10*100) // 愤坌及潜谛互失伙 奴丢永玄韶
|
||||
#define AI_FIX_PETULTIMATE (-10*100) // 矢永玄互失伙 奴丢永玄韶
|
||||
#define AI_FIX_PLAYERDEAD (-1*100) // 愤坌及潜谛互竣濮
|
||||
#define AI_FIX_PETDEAD (-5*100) // 矢永玄互竣濮
|
||||
|
||||
|
||||
#ifdef _Item_ReLifeAct
|
||||
int BATTLE_getBattleDieIndex( int battleindex, int bid );
|
||||
#endif
|
||||
|
||||
int BATTLE_No2Index( int battleindex, int No);
|
||||
|
||||
int BATTLE_Index2No( int battleindex, int charaindex);
|
||||
|
||||
BOOL BATTLE_initBattleArray( int battlenum);
|
||||
|
||||
int BATTLE_CreateBattle( int charaindex );
|
||||
int BATTLE_DeleteBattle( int battleindex);
|
||||
|
||||
int BATTLE_NewEntry( int charaindex, int battleindex, int side);
|
||||
|
||||
#define BATTLE_Exit( charaindex, battleindex) _BATTLE_Exit( __FILE__, __LINE__, charaindex, battleindex)
|
||||
INLINE int _BATTLE_Exit( char *file, int line, int charaindex ,int battleindex);
|
||||
|
||||
#define BATTLE_ExitAll( battleindex) _BATTLE_ExitAll( __FILE__, __LINE__, battleindex)
|
||||
INLINE void _BATTLE_ExitAll( char *file, int line, int battleindex);
|
||||
|
||||
int BATTLE_CreateVsPlayer( int charaindex0, int charaindex1);
|
||||
|
||||
int BATTLE_CreateVsEnemy( int charaindex, int mode, int npcindex);
|
||||
|
||||
int BATTLE_CountEntry( int battleindex, int side);
|
||||
|
||||
int BATTLE_Loop( void );
|
||||
|
||||
int BATTLE_FinishSet( int battleindex );
|
||||
int BATTLE_StopSet( int battleindex );
|
||||
int BATTLE_RescueEntry( int charaindex, int toindex);
|
||||
|
||||
int BATTLE_PetDefaultExit( int charaindex, int battleindex);
|
||||
|
||||
int BATTLE_PetDefaultEntry(
|
||||
int charaindex, // 矢永玄毛 匀化中月皿伊奶乩□及
|
||||
int battleindex,// 田玄伙奶件犯永弁旦
|
||||
int side
|
||||
);
|
||||
|
||||
BOOL BATTLE_RescueTry( int charaindex);
|
||||
|
||||
BOOL BATTLE_RescueParentTry(
|
||||
int charaindex,
|
||||
int pindex
|
||||
);
|
||||
|
||||
int BATTLE_DefaultAttacker( int battleindex, int side);
|
||||
|
||||
BOOL BATTLE_IsThrowWepon( int itemindex);
|
||||
|
||||
void BATTLE_BadStatusString( int defNo, int status );
|
||||
int BATTLE_MultiList( int battleindex, int toNo, int ToList[] );
|
||||
BOOL BATTLE_IsCharge( int com );
|
||||
BOOL BATTLE_CanMoveCheck( int charaindex );
|
||||
int BATTLE_TargetCheck( int battleindex, int defNo);
|
||||
char *BATTLE_CharTitle( int charaindex );
|
||||
void BATTLE_EscapeDpSend( int battleindex, int charaindex );
|
||||
int BATTLE_GetDuelPoint( int battleindex, int side, int num);
|
||||
int BATTLE_TargetCheckDead( int battleindex, int defNo);
|
||||
|
||||
void BATTLE_MultiListDead( int battleindex, int toNo, int ToList[] );
|
||||
BOOL BATTLE_WatchTry( int charaindex);
|
||||
int BATTLE_WatchEntry( int charaindex, int toindex);
|
||||
void BATTLE_WatchStop( int charaindex );
|
||||
int BATTLE_WatchUnLink( int battleindex );
|
||||
void BATTLE_BpSendToWatch( BATTLE *pBattle, char *pszBcString);
|
||||
|
||||
int BATTLE_GetWepon( int charaindex );
|
||||
|
||||
#ifdef _ITEM_EQUITSPACE
|
||||
int BATTLE_GetEqShield( int charaindex );
|
||||
#endif
|
||||
|
||||
int BATTLE_GetAttackCount( int charaindex );
|
||||
int DoujyouRandomWeponSet( int charaindex );
|
||||
void BATTLE_AttReverse( int charaindex );
|
||||
void BATTLE_BadStatusAllClr( int charaindex );
|
||||
#define CHAR_GETWORKINT_HIGH( index, pos ) ( CHAR_getWorkInt( (index), (pos) ) >> 16 )
|
||||
#define CHAR_SETWORKINT_HIGH( index, pos, set ) { int iTmp = CHAR_getWorkInt( (index), (pos) ) & 0xFFFF, work = (set); CHAR_setWorkInt( (index), (pos), (work << 16)|iTmp ); }
|
||||
#define CHAR_GETWORKINT_LOW( index, pos ) ( CHAR_getWorkInt( (index), (pos) ) & 0xFFFF )
|
||||
#define CHAR_SETWORKINT_LOW( index, pos, set ) { int iTmp = CHAR_getWorkInt( index, pos ) & 0xFFFF0000, work = (set); CHAR_setWorkInt( (index), (pos), (work & 0x0000FFFF) | iTmp ); }
|
||||
|
||||
int Battle_getTotalBattleNum();
|
||||
|
||||
#ifdef _TYPE_TOXICATION
|
||||
void CHAR_ComToxicationHp( int charaindex);
|
||||
#endif
|
||||
|
||||
#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能
|
||||
void BATTLE_ProfessionStatus_init( int battleindex, int charaindex );
|
||||
void BATTLE_ProfessionStatusSeq( int battleindex, int charaindex);
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
#ifdef _FM_NPC_LOOK_WAR
|
||||
int SearchFmWarRandIndex(int charaindex,int fmwarfloor);
|
||||
char* SearchFmWar(int charaindex,int fmwarselect);
|
||||
int LookFmWarIndex(int charaindex,int fmwarselect);
|
||||
|
||||
#ifdef _ALLBLUES_LUA_1_4
|
||||
INLINE BOOL BATTLE_setLUAFunction( int battleindex, int functype, lua_State *L, const char *luafunctable);
|
||||
INLINE lua_State *BATTLE_getLUAFunction( int battle, int functype);
|
||||
#endif
|
||||
|
||||
void Enemy_setStayLoop(int charaindex);
|
||||
#endif
|
10
include/battle_ai.h
Normal file
10
include/battle_ai.h
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef __BATTLE_AI_H__
|
||||
#define __BATTLE_AI_H__
|
||||
|
||||
/* Ô»éø */
|
||||
int BATTLE_ai_all( int battleindex, int side, int turn);
|
||||
int BATTLE_ai_one( int charaindex, int battleindex, int side, int turn);
|
||||
#ifdef _ENEMY_ATTACK_AI
|
||||
int GetSubdueAtt(int index);
|
||||
#endif
|
||||
#endif
|
27
include/battle_command.h
Normal file
27
include/battle_command.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef __BATTLE_COMMAND_H__
|
||||
#define __BATTLE_COMMAND_H__
|
||||
|
||||
void BattleCommandDispach(
|
||||
int fd,
|
||||
char *command
|
||||
);
|
||||
|
||||
void BattleEncountOut(
|
||||
int charaindex
|
||||
);
|
||||
|
||||
BOOL BATTLE_CommandSend( int charaindex, char *pszCommand );
|
||||
|
||||
BOOL BATTLE_MakeCharaString(
|
||||
int battleindex,
|
||||
char *pszCommand, // 平乓仿弁正□树 请 燮
|
||||
int size // 扔奶术
|
||||
);
|
||||
|
||||
void BATTLE_CharSendAll( int battleindex );
|
||||
|
||||
BOOL BATTLE_PetDefaultCommand( int petindex );
|
||||
|
||||
void BATTLE_ActSettingSend( int battleindex );
|
||||
|
||||
#endif
|
382
include/battle_event.h
Normal file
382
include/battle_event.h
Normal file
@ -0,0 +1,382 @@
|
||||
#ifndef __BATTLE_EVENT_H__
|
||||
#define __BATTLE_EVENT_H__
|
||||
|
||||
#define BCC_HIT 'H'
|
||||
#define BCC_FIRE 'F'
|
||||
|
||||
#define BCF_DEATH (1 << 0)
|
||||
#define BCF_NORMAL (1 << 1)
|
||||
#define BCF_KAISHIN (1 << 2)
|
||||
#define BCF_GUARD (1 << 3)
|
||||
#define BCF_COUNTER (1 << 4)
|
||||
#define BCF_DODGE (1 << 5)
|
||||
#define BCF_ULTIMATE_1 (1 << 6)
|
||||
#define BCF_ULTIMATE_2 (1 << 7)
|
||||
#define BCF_GBREAK (1 << 8)
|
||||
#define BCF_GUARDIAN (1 << 9)
|
||||
#define BCF_REFRECT (1 << 10)
|
||||
#define BCF_ABSORB (1 << 11)
|
||||
#define BCF_VANISH (1 << 12)
|
||||
#define BCF_CRUSH (1 << 13)
|
||||
#define BCF_FALL (1 << 14) //落马术
|
||||
#ifdef _SKILL_TOOTH
|
||||
#define BCF_TOOTH (1 << 15) //囓齿
|
||||
#endif
|
||||
#ifdef _PSKILL_MODIFY
|
||||
#define BCF_ATTDOUBLE (1 << 16) //属性强化
|
||||
#endif
|
||||
#ifdef _SKILL_ROAR
|
||||
#define BCF_ROAR (1 << 17) //宠技:大吼(克年兽)
|
||||
#endif
|
||||
|
||||
#ifdef _MAGIC_DEFMAGICATT
|
||||
#define BCF_DEFMAGICATT (1 << 19)
|
||||
#endif
|
||||
#ifdef _MAGIC_SUPERWALL
|
||||
#define BCF_SUPERWALL (1 << 20)
|
||||
#endif
|
||||
#ifdef _PSKILL_MDFYATTACK
|
||||
#define BCF_MODIFY (1 << 21)
|
||||
#endif
|
||||
|
||||
#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能
|
||||
#define BCF_F_SKILLACT (1 << 22) //击中前秀图
|
||||
#define BCF_TRAP (1 << 25) //陷阱
|
||||
#define BCF_NO_DAMAGE (1 << 26) //双重攻击
|
||||
#endif
|
||||
#define BCF_B_SKILLACT (1 << 23) //击中後秀图
|
||||
|
||||
|
||||
|
||||
#ifdef _EQUIT_ARRANGE
|
||||
#define BCF_B_ARRANGE (1 << 24) //格挡秀图
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_ACUPUNCTURE
|
||||
#define BCF_ACUPUNCTURE (1 << 27)
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_ANTINTER
|
||||
#define BCF_ANTINTER (1 << 28)
|
||||
#endif
|
||||
|
||||
#ifdef _OTHER_MAGICSTAUTS
|
||||
#ifdef _MAGICSTAUTS_RESIST
|
||||
#define MAXSTATUSTYPE 6
|
||||
#else
|
||||
#define MAXSTATUSTYPE 3
|
||||
#endif //_MAGICSTAUTS_RESIST
|
||||
extern char MagicStatus[MAXSTATUSTYPE][36];
|
||||
extern int MagicTbl[];
|
||||
extern int MagicTypeTbl[];
|
||||
#endif
|
||||
|
||||
extern char *aszStatus[];
|
||||
extern char *aszStatusFull[];
|
||||
extern int StatusTbl[];
|
||||
extern int RegTbl[];
|
||||
extern int MagicDefTbl[];
|
||||
extern char *aszMagicDefFull[];
|
||||
extern char *aszMagicDef[];
|
||||
|
||||
extern char *aszParamChange[];
|
||||
extern char *aszParamChangeFull[];
|
||||
extern int aParamChangeTbl[];
|
||||
|
||||
extern float gBattleDamageModyfy;
|
||||
extern int gBattleDuckModyfy;
|
||||
extern int gBattleStausChange;
|
||||
extern int gBattleStausTurn;
|
||||
|
||||
enum{
|
||||
BATTLE_ST_NONE, // 0 "正常",
|
||||
BATTLE_ST_POISON, // 1 "毒",
|
||||
BATTLE_ST_PARALYSIS, // 2 "麻",
|
||||
BATTLE_ST_SLEEP, // 3 "眠",
|
||||
BATTLE_ST_STONE, // 4 "石",
|
||||
BATTLE_ST_DRUNK, // 5 "醉",
|
||||
BATTLE_ST_CONFUSION, // 6 "乱",
|
||||
BATTLE_ST_WEAKEN, // 7 "虚"
|
||||
BATTLE_ST_DEEPPOISON,// 8 "剧毒"
|
||||
BATTLE_ST_BARRIER, // 9 "魔障"
|
||||
BATTLE_ST_NOCAST, // 10 "沉默"
|
||||
#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延
|
||||
BATTLE_ST_SARS, // 11 "煞"
|
||||
#endif
|
||||
#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能
|
||||
BATTLE_ST_DIZZY, // 12 "晕"
|
||||
BATTLE_ST_ENTWINE, // 13 "缠"
|
||||
BATTLE_ST_DRAGNET, // 14 "天罗地网"
|
||||
BATTLE_ST_ICECRACK, // 15 "冰爆术"
|
||||
BATTLE_ST_OBLIVION, // 16 "遗忘"
|
||||
BATTLE_ST_ICEARROW, // 17 "冰箭"
|
||||
BATTLE_ST_BLOODWORMS,// 18 "嗜血蛊"
|
||||
BATTLE_ST_SIGN, // 19 "一针见血"
|
||||
BATTLE_ST_INSTIGATE, // 20 "挑拨"
|
||||
BATTLE_ST_F_ENCLOSE, // 21 "火附体"
|
||||
BATTLE_ST_I_ENCLOSE, // 22 "冰附体"
|
||||
BATTLE_ST_T_ENCLOSE, // 23 "雷附体"
|
||||
BATTLE_ST_FOCUS, // 24 "专注战斗"
|
||||
BATTLE_ST_RESIST_F, // 25 "火抗"
|
||||
BATTLE_ST_RESIST_I, // 26 "冰抗"
|
||||
BATTLE_ST_RESIST_T, // 27 "雷抗"
|
||||
BATTLE_ST_F_ENCLOSE2, // 28 "火附"
|
||||
BATTLE_ST_I_ENCLOSE2, // 29 "冰附"
|
||||
BATTLE_ST_T_ENCLOSE2, // 30 "雷附"
|
||||
#ifdef _PROFESSION_ADDSKILL
|
||||
BATTLE_ST_RESIST_F_I_T, //31 "火冰雷抗"
|
||||
//BATTLE_ST_BOUNDARY_F, //32 "火结界
|
||||
BATTLE_ST_WATER, //32 "水附体"
|
||||
BATTLE_ST_WORKANNEX, //33 "附身"
|
||||
BATTLE_ST_FEAR, //34 "恐惧"
|
||||
BATTLE_ST_ICECRACK2, // 35 "冰爆术"
|
||||
BATTLE_ST_ICECRACK3, // 36
|
||||
BATTLE_ST_ICECRACK4, // 37
|
||||
BATTLE_ST_ICECRACK5, // 38
|
||||
BATTLE_ST_ICECRACK6, // 39
|
||||
BATTLE_ST_ICECRACK7, // 40
|
||||
BATTLE_ST_ICECRACK8, // 41
|
||||
BATTLE_ST_ICECRACK9, // 42
|
||||
BATTLE_ST_ICECRACK10, // 43
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
BATTLE_ST_END
|
||||
};
|
||||
|
||||
#ifdef _OTHER_MAGICSTAUTS
|
||||
enum{
|
||||
BATTLE_MST_NONE,
|
||||
BATTLE_MST_DEFMAGIC,
|
||||
BATTLE_MST_SUPERWALL,
|
||||
#ifdef _MAGICSTAUTS_RESIST
|
||||
BATTLE_MST_MAGICFIRE,
|
||||
BATTLE_MST_MAGICTHUNDER,
|
||||
BATTLE_MST_MAGICICE,
|
||||
#endif
|
||||
BATTLE_MST_END
|
||||
};
|
||||
#endif
|
||||
|
||||
enum{
|
||||
BATTLE_MD_NONE,
|
||||
BATTLE_MD_ABSROB,
|
||||
BATTLE_MD_REFLEC,
|
||||
BATTLE_MD_VANISH,
|
||||
BATTLE_MD_TRAP,
|
||||
#ifdef _PETSKILL_ACUPUNCTURE
|
||||
BATTLE_MD_ACUPUNCTURE, //针刺外皮
|
||||
#endif
|
||||
BATTLE_MD_END
|
||||
};
|
||||
|
||||
#ifdef _PETSKILL_RETRACE
|
||||
//存放BATTLE_Attack函式执行後的攻击模式
|
||||
typedef struct tagBattle_Attack_ReturnData_x1
|
||||
{
|
||||
int Battle_Attack_ReturnData;
|
||||
}Battle_Attack_ReturnData_x1;
|
||||
Battle_Attack_ReturnData_x1 Battle_Attack_ReturnData_x;
|
||||
|
||||
#endif
|
||||
|
||||
int BATTLE_DamageCalc( int attackindex, int defindex );
|
||||
|
||||
BOOL BATTLE_Attack( int battleindex, int attackNo, int defNo );
|
||||
|
||||
BOOL BATTLE_Counter( int battleindex, int attackNo, int defNo );
|
||||
|
||||
BOOL BATTLE_Capture( int battleindex, int attackNo, int defNo );
|
||||
|
||||
void BATTLE_Guard( int battleindex, int attackNo );
|
||||
|
||||
// Nuke 20040112 fix for performance
|
||||
#define BATTLE_BroadCast(A,B,C) 0
|
||||
#define BATTLE_BroadCastOn(A,B,C) 0
|
||||
//int BATTLE_BroadCast( int battleindex, char *pszBuffer, int color );
|
||||
//int BATTLE_BroadCastOn( int battleindex, char *pszBuffer, int color );
|
||||
|
||||
BOOL BATTLE_Escape( int battleindex, int attackNo, int flag);
|
||||
|
||||
int BATTLE_NoAction( int battleindex, int attackNo );
|
||||
|
||||
int BATTLE_PetIn( int battleindex, int attackNo );
|
||||
|
||||
int BATTLE_PetOut( int battleindex, int attackNo );
|
||||
|
||||
int BATTLE_SurpriseCheck( int battleindex );
|
||||
|
||||
int BATTLE_Magic( int battleindex, int attackNo );
|
||||
|
||||
int BATTLE_S_GBreak( int battleindex, int attackNo, int defNo );
|
||||
|
||||
#ifdef _SKILL_GUARDBREAK2//破除防御2 vincent add 2002/05/20
|
||||
int BATTLE_S_GBreak2( int battleindex, int attackNo, int defNo );
|
||||
#endif
|
||||
|
||||
#ifdef _SKILL_SACRIFICE
|
||||
int BATTLE_S_Sacrifice( int battleindex, int attackNo, int defNo );
|
||||
#endif
|
||||
|
||||
#ifdef _SKILL_REFRESH
|
||||
int BATTLE_S_Refresh( int battleindex, int attackNo, int defNo, int marray );
|
||||
#endif
|
||||
|
||||
#ifdef _SKILL_WEAKEN //vincent宠技:虚弱
|
||||
int BATTLE_S_Weaken( int battleindex, int attackNo, int defNo, int marray );
|
||||
#endif
|
||||
|
||||
#ifdef _SKILL_DEEPPOISON //vincent宠技:剧毒
|
||||
int BATTLE_S_Deeppoison( int battleindex, int attackNo, int defNo, int marray );
|
||||
#endif
|
||||
|
||||
#ifdef _SKILL_BARRIER //vincent宠技:魔障
|
||||
int BATTLE_S_Barrier( int battleindex, int attackNo, int defNo, int marray );
|
||||
#endif
|
||||
|
||||
#ifdef _SKILL_NOCAST //vincent宠技:沉默
|
||||
int BATTLE_S_Nocast( int battleindex, int attackNo, int defNo, int marray );
|
||||
#endif
|
||||
|
||||
#ifdef _SKILL_ROAR //vincent宠技:大吼
|
||||
int BATTLE_S_Roar( int battleindex, int attackNo, int defNo, int marray );
|
||||
#endif
|
||||
|
||||
int BATTLE_Charge( int battleindex, int attackNo );
|
||||
|
||||
|
||||
int BATTLE_StatusAttackCheck(
|
||||
|
||||
int attackindex,
|
||||
int defindex,
|
||||
int status,
|
||||
//BATTLE_ST_POISON, 1 "毒",
|
||||
//BATTLE_ST_PARALYSIS, 2 "麻",
|
||||
//BATTLE_ST_SLEEP, 3 "眠",
|
||||
//BATTLE_ST_STONE, 4 "石",
|
||||
//BATTLE_ST_DRUNK, 5 "醉",
|
||||
//BATTLE_ST_CONFUSION, 6 "乱"
|
||||
int PerOffset,
|
||||
int Range,
|
||||
float Bai,
|
||||
int *pPer
|
||||
);
|
||||
|
||||
int BATTLE_Combo( int battleindex, int *pAttackList, int defNo );
|
||||
|
||||
int BATTLE_EarthRoundHide( int battleindex, int attackNo );
|
||||
|
||||
int BATTLE_GetDamageReact( int charaindex );
|
||||
|
||||
void BATTLE_talkToCli( int charaindex, char *pszBuffer, int color );
|
||||
|
||||
#ifdef _PETSKILL_SETDUCK
|
||||
BOOL BATTLE_CheckMySkillDuck( int charaindex );
|
||||
#endif
|
||||
|
||||
BOOL BATTLE_LostEscape( int battleindex, int attackNo );
|
||||
|
||||
BOOL BATTLE_Abduct( int battleindex, int attackNo, int defNo, int array );
|
||||
|
||||
void BATTLE_Steal( int battleindex, int attackNo, int defNo );
|
||||
|
||||
int BATTLE_getReactFlg( int index, int react);
|
||||
|
||||
#ifdef _BATTLESTEAL_FIX
|
||||
void BATTLE_StealMoney( int battleindex, int attackNo, int defNo) ;
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_LER
|
||||
void BATTLE_BatFly(int battleindex,int attackNo,int myside);
|
||||
void BATTLE_DivideAttack(int battleindex,int attackNo,int myside);
|
||||
void BATTLE_LerChange(int battleindex,int charaindex,int no);
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_BATTLE_MODEL
|
||||
void BATTLE_BattleModel(int battleindex,int attackNo,int myside);
|
||||
#endif
|
||||
|
||||
// Robin 0727 Ride Pet
|
||||
#define ATTACKSIDE 1
|
||||
#define DEFFENCESIDE 2
|
||||
|
||||
float BATTLE_adjustRidePet3A( int charaindex, int petindex, int workindex, int action );
|
||||
|
||||
int BATTLE_getRidePet( int charaindex );
|
||||
|
||||
#ifdef _PSKILL_FALLGROUND //落马术
|
||||
int BATTLE_S_FallGround( int battleindex, int attackNo, int defNo, int skill_type );
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_PROPERTY
|
||||
int BATTLE_S_PetSkillProperty( int battleindex, int attackNo, int skill_type, int skill);
|
||||
#endif
|
||||
|
||||
int BATTLE_S_AttackDamage( int battleindex, int attackNo, int defNo, int skill_type, int skill);
|
||||
|
||||
#ifdef _MAGIC_SUPERWALL
|
||||
int PETSKILL_MagicStatusChange_Battle( int battleindex, int attackNo, int toNo, int marray);
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_SETDUCK
|
||||
int PETSKILL_SetDuckChange_Battle( int battleindex, int attackNo, int toNo, int marray);
|
||||
#endif
|
||||
|
||||
#ifdef _MAGICPET_SKILL
|
||||
int PETSKILL_SetMagicPet_Battle( int battleindex, int attackNo, int toNo, int marray);
|
||||
#endif
|
||||
|
||||
#ifdef _TAKE_ITEMDAMAGE
|
||||
int BATTLE_ItemCrushCheck( int charaindex , int flg);
|
||||
int BATTLE_ItemCrush( int charaindex, int ItemEquip, int Damages, int flg);
|
||||
#endif
|
||||
|
||||
#ifdef _PRO_BATTLEENEMYSKILL
|
||||
int BATTLE_E_ENEMYREFILE( int battleindex, int attackNo, int defNo, int skill_type );
|
||||
|
||||
int BATTLE_E_ENEMYREHP( int battleindex, int attackNo, int defNo, int skill_type );
|
||||
|
||||
int BATTLE_E_ENEMYHELP( int battleindex, int attackNo, int defNo, int skill_type );
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _PREVENT_TEAMATTACK
|
||||
int BATTLE_CheckSameSide( int charaindex, int toNo);
|
||||
#endif
|
||||
|
||||
#ifdef _USER_CHARLOOPS
|
||||
int CHAR_BattleStayLoop( int charaindex);//原地遇敌
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_PROPERTY
|
||||
int PET_PetskillPropertyEvent( int Myindex, int defindex, int *damage, int *T_Pow, int size);
|
||||
#endif
|
||||
|
||||
#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能
|
||||
int battle_profession_attack_fun(int battleindex, int attackNo, int defNo, int charaindex);
|
||||
int battle_profession_attack_magic_fun(int battleindex, int attackNo, int defNo, int charaindex);
|
||||
int battle_profession_assist_fun(int battleindex, int attackNo, int defNo, int charaindex);
|
||||
int battle_profession_status_chang_fun(int battleindex, int attackNo, int defNo, int charaindex);
|
||||
int BATTLE_check_profession_duck( int charaindex, int per );
|
||||
int BATTLE_PROFESSION_ATK_PET_DamageSub( int attackindex, int defindex, int *pDamage, int *pPetDamage, int *pRefrect, int skill_level );
|
||||
int PROFESSION_BATTLE_StatusAttackCheck( int charaindex, int toindex, int status, int Success );
|
||||
int BATTLE_PROFESSION_CONVOLUTE_GET_DAMAGE( int attackindex, int defindex, int skill_level );
|
||||
int BATTLE_PROFESSION_THROUGH_ATTACK_GET_DAMAGE( int attackindex, int defindex );
|
||||
int BATTLE_PROFESSION_RANG_ATTACK_DAMAGE( int charaindex, int attackNo, int defNo, int skill_type, int status, int turn, int perStatus, int effect, int img1, int img2 );
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_FIREKILL //火线猎杀专用
|
||||
int BATTLE_Attack_FIREKILL( int battleindex, int attackNo, int defNo );
|
||||
#endif
|
||||
#ifdef _PROFESSION_ADDSKILL
|
||||
BOOL BATTLE_BattleUltimate( int battleindex, int bid ); //检查此位罝上是否被打飞
|
||||
#endif
|
||||
#ifdef _NEED_ITEM_ENEMY
|
||||
int need_item_eneny_init();
|
||||
#endif
|
||||
#ifdef _OFFLINE_SYSTEM
|
||||
int OFFLINE_MultiRessurect( int battleindex, int attackNo, int toNo, int HP, int flg);
|
||||
#endif
|
||||
#endif
|
36
include/battle_item.h
Normal file
36
include/battle_item.h
Normal file
@ -0,0 +1,36 @@
|
||||
#ifndef _BATTLE_ITEM_H_
|
||||
#define _BATTLE_ITEM_H_
|
||||
//--------------------------------------------------------------
|
||||
// 솎呻呵켈 馬챘陵焞禁堯퀼섟醴
|
||||
//--------------------------------------------------------------
|
||||
// 얽 섟堯퀼
|
||||
void ITEM_useRecovery_Battle( int charaindex, int toindex, int itemindex );
|
||||
void ITEM_useStatusChange_Battle( int charaindex, int toindex, int itemindex );
|
||||
void ITEM_useMagicDef_Battle( int charaindex, int toindex, int itemindex );
|
||||
void ITEM_useParamChange_Battle( int charaindex, int toindex, int itemindex );
|
||||
void ITEM_useFieldChange_Battle( int charaindex, int toindex, int itemindex );
|
||||
void ITEM_useAttReverse_Battle( int charaindex, int toindex, int itemindex );
|
||||
void ITEM_useStatusRecovery_Battle( int charaindex, int toindex, int itemindex );
|
||||
void ITEM_useCaptureUp_Battle( int charaindex, int toindex, int itemindex );
|
||||
#ifdef _ITEM_CRACKER
|
||||
void ITEM_useCracker_Effect( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _ITEM_ADDEXP //vincent 쒔駱瓊<EFA49A>
|
||||
void ITEM_useAddexp_Effect( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _ITEM_REFRESH //vincent 썩뇜嫩끽榴檄돛야
|
||||
void ITEM_useRefresh_Effect( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
//Terry add 2001/12/24
|
||||
#ifdef _ITEM_FIRECRACKER
|
||||
void ITEM_useFirecracker_Battle(int charaindex,int toindex,int itemindex);
|
||||
#endif
|
||||
//Terry end
|
||||
|
||||
#ifdef _ITEM_MAGICRECOVERY
|
||||
void ITEM_useMRecovery_Battle( int charaindex, int toNo, int haveitemindex );
|
||||
#endif
|
||||
#ifdef _ITEM_USEMAGIC
|
||||
void ITEM_useMagic_Battle( int charaindex, int toNo, int haveitemindex );
|
||||
#endif
|
||||
#endif
|
336
include/battle_magic.h
Normal file
336
include/battle_magic.h
Normal file
@ -0,0 +1,336 @@
|
||||
#ifndef _BATTLE_MAGIC_H_
|
||||
#define _BATTLE_MAGIC_H_
|
||||
|
||||
#define MAGIC_EFFECT_USER 100600
|
||||
#define SPR_heal 100601
|
||||
#define SPR_heal2 100602
|
||||
#define SPR_heal3 100603
|
||||
#define SPR_tyusya 100604
|
||||
#define SPR_hoshi 100605
|
||||
|
||||
|
||||
#define MAGIC_ID_RECOVERY 1
|
||||
#define MAGIC_ID_STATUS_RECOVERY 3
|
||||
#define MAGIC_ID_FIELD_CHANGE 4
|
||||
#define MAGIC_ID_BADSTATUS 5
|
||||
|
||||
enum{
|
||||
BFUKI_CAPTUREUP,
|
||||
BFUKI_END
|
||||
};
|
||||
|
||||
|
||||
enum{
|
||||
PC_KIND_NONE,
|
||||
PC_KIND_ATTACK,
|
||||
PC_KIND_DEFENSE,
|
||||
PC_KIND_QUICK,
|
||||
PC_KIND_CHARM,
|
||||
PC_KIND_CAPTURE,
|
||||
PC_KIND_END
|
||||
};
|
||||
|
||||
int MAGIC_Recovery_Battle(
|
||||
int charaindex,
|
||||
int toindex,
|
||||
int magicindex,
|
||||
int mp
|
||||
);
|
||||
|
||||
int MAGIC_FieldAttChange_Battle(
|
||||
int charaindex,
|
||||
int toindex,
|
||||
int marray,
|
||||
int mp
|
||||
);
|
||||
|
||||
int MAGIC_StatusChange_Battle(
|
||||
int charaindex,
|
||||
int toindex,
|
||||
int marray,
|
||||
int mp
|
||||
);
|
||||
|
||||
#ifdef _MAGIC_DEEPPOISON
|
||||
int MAGIC_StatusChange_Battle2(
|
||||
int charaindex,
|
||||
int toindex,
|
||||
int marray,
|
||||
int mp
|
||||
);
|
||||
#endif
|
||||
|
||||
#ifdef _OTHER_MAGICSTAUTS
|
||||
int MAGIC_MagicStatusChange_Battle( int charaindex, int toNo, int marray, int mp );
|
||||
|
||||
#endif
|
||||
|
||||
int MAGIC_MagicDef_Battle(
|
||||
int charaindex,
|
||||
int toNo,
|
||||
int marray,
|
||||
int mp
|
||||
);
|
||||
|
||||
void BATTLE_MultiRecovery(
|
||||
int battleindex,
|
||||
int attackNo,
|
||||
int toNo,
|
||||
int kind,
|
||||
int power,
|
||||
int per,
|
||||
int UseEffect,
|
||||
int RecevEffect
|
||||
|
||||
);
|
||||
|
||||
#ifdef _IMPRECATE_ITEM
|
||||
void BATTLE_ImprecateRecovery(
|
||||
int battleindex,
|
||||
int attackNo,
|
||||
int toNo,
|
||||
int kind,
|
||||
int powers,
|
||||
int rounds,
|
||||
int UseEffect,
|
||||
int RecevEffect
|
||||
);
|
||||
#endif
|
||||
void BATTLE_MultiStatusChange(
|
||||
int battleindex,
|
||||
int attackNo,
|
||||
int toNo,
|
||||
int status,
|
||||
int turn,
|
||||
int UseEffect,
|
||||
int RecevEffect,
|
||||
int Success
|
||||
);
|
||||
|
||||
#ifdef _OTHER_MAGICSTAUTS
|
||||
void BATTLE_MultiMagicStatusChange(
|
||||
int battleindex,
|
||||
int attackNo,
|
||||
int toNo,
|
||||
int status,
|
||||
int turn,
|
||||
int UseEffect,
|
||||
int RecevEffect,
|
||||
int nums
|
||||
);
|
||||
#endif
|
||||
|
||||
void BATTLE_MultiMagicDef(
|
||||
int battleindex,
|
||||
int attackNo,
|
||||
int toNo,
|
||||
int kind,
|
||||
int count,
|
||||
int UseEffect,
|
||||
int RecevEffect
|
||||
);
|
||||
|
||||
void BATTLE_MultiParamChange(
|
||||
int battleindex,
|
||||
int attackNo,
|
||||
int toNo,
|
||||
int kind,
|
||||
int power,
|
||||
int par,
|
||||
int UseEffect,
|
||||
int RecevEffect
|
||||
);
|
||||
|
||||
int MAGIC_FieldAttChange_Battle(
|
||||
int charaindex,
|
||||
int toNo,
|
||||
int marray,
|
||||
int mp
|
||||
);
|
||||
|
||||
int BATTLE_FieldAttChange(
|
||||
int charaindex,
|
||||
char *pArg
|
||||
);
|
||||
|
||||
void BATTLE_MultiAttReverse(
|
||||
int battleindex,
|
||||
int attackNo,
|
||||
int toNo,
|
||||
int UseEffect,
|
||||
int RecevEffect
|
||||
);
|
||||
|
||||
|
||||
void BATTLE_MultiStatusRecovery(
|
||||
int battleindex,
|
||||
int attackNo,
|
||||
int toNo,
|
||||
int status,
|
||||
int UseEffect,
|
||||
int RecevEffect
|
||||
);
|
||||
|
||||
int MAGIC_StatusRecovery_Battle(
|
||||
int charaindex,
|
||||
int toNo,
|
||||
int marray,
|
||||
int mp
|
||||
);
|
||||
|
||||
void BATTLE_MultiRessurect(
|
||||
int battleindex,
|
||||
int attackNo,
|
||||
int toNo,
|
||||
int power,
|
||||
int per,
|
||||
int UseEffect,
|
||||
int RecevEffect
|
||||
);
|
||||
|
||||
void BATTLE_MultiCaptureUp(
|
||||
int battleindex,
|
||||
int attackNo,
|
||||
int toNo,
|
||||
int power,
|
||||
int UseEffect,
|
||||
int RecevEffect
|
||||
);
|
||||
//
|
||||
//***********************************************************
|
||||
|
||||
//****************************************************************
|
||||
//
|
||||
// 竣濮井日汊唾允月热诸
|
||||
//
|
||||
int MAGIC_Ressurect_Battle(
|
||||
int charaindex, // 井仃月谛及奶件犯永弁旦
|
||||
int toNo, // 井仃日木月谛及奶件犯永弁旦
|
||||
int marray, // magicindex
|
||||
int mp // MP
|
||||
);
|
||||
// 岳 仄凶日 TRUE
|
||||
// 撩 仄凶日 FALSE
|
||||
//****************************************************************
|
||||
|
||||
//****************************************************************
|
||||
//
|
||||
// 箪岭及 鳖毛允月热诸
|
||||
//
|
||||
int MAGIC_AttReverse_Battle(
|
||||
int charaindex, // 井仃月谛及奶件犯永弁旦
|
||||
int toNo, // 井仃日木月谛及奶件犯永弁旦
|
||||
int marray, // magicindex
|
||||
int mp // MP
|
||||
);
|
||||
// 岳 仄凶日 TRUE
|
||||
// 撩 仄凶日 FALSE
|
||||
//****************************************************************
|
||||
//****************************************************************
|
||||
//
|
||||
// 凯 祭允月热诸
|
||||
//
|
||||
int MAGIC_CaptureUp_Battle(
|
||||
int charaindex, // 井仃月谛及奶件犯永弁旦
|
||||
int toNo, // 井仃日木月谛及奶件犯永弁旦
|
||||
int marray, // magicindex
|
||||
int mp // MP
|
||||
);
|
||||
// 岳 仄凶日 TRUE
|
||||
// 撩 仄凶日 FALSE
|
||||
//****************************************************************
|
||||
|
||||
//***********************************************************
|
||||
//
|
||||
// 芊羁匹 醒及平乓仿弁正□毛汊唾今六月今日卞 芊 豢毛馨笛
|
||||
//
|
||||
void BATTLE_MultiResAndDef(
|
||||
int battleindex, // 田玄伙奶件犯永弁旦
|
||||
int attackNo, // 井仃月谛 寞
|
||||
int toNo, // 井仃日木月谛 寞
|
||||
int power, // 湘 荚汊袄
|
||||
int per, // ⊙井"
|
||||
int kind, // 芊 豢及潘
|
||||
int count, // 窒荚 什井
|
||||
int UseEffect, // 银丹谛及巨白尼弁玄
|
||||
int RecevEffect // 井仃日木月谛及巨白尼弁玄
|
||||
);
|
||||
//
|
||||
//***********************************************************
|
||||
//****************************************************************
|
||||
//
|
||||
// 汊唾≈ 芊 豢毛芨尹月热诸
|
||||
//
|
||||
int MAGIC_ResAndDef_Battle(
|
||||
int charaindex, // 井仃月谛及奶件犯永弁旦
|
||||
int toNo, // 井仃日木月谛及奶件犯永弁旦
|
||||
int marray, // magicindex
|
||||
int mp // MP
|
||||
);
|
||||
// 岳 仄凶日 TRUE
|
||||
// 撩 仄凶日 FALSE
|
||||
//****************************************************************
|
||||
|
||||
#ifdef _ATTACK_MAGIC
|
||||
int MAGIC_AttMagic_Battle( int charaindex , int toNo , int marray , int mp );
|
||||
#ifdef _FIX_MAGICDAMAGE
|
||||
void BATTLE_MultiAttMagic( int battleindex, int attackNo, int toNo,
|
||||
int attIdx ,int FieldAttr ,int Power, int MagicLv);
|
||||
|
||||
#else
|
||||
void BATTLE_MultiAttMagic( int battleindex , int attackNo , int toNo , int attIdx , int FieldAttr , int Power );
|
||||
#endif
|
||||
int MAGIC_AttMagic_Battle( int charaindex , int toNo , int marray , int mp );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef _MAGIC_TOCALL
|
||||
int MAGIC_ToCallDragon_Battle( int charaindex , int toNo , int marray , int mp );
|
||||
|
||||
void BATTLE_MultiToCallDragonMagic( int battleindex, int attackNo, int toNo,
|
||||
int attIdx ,int FieldAttr ,int Power, int ImageNo);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _Item_ReLifeAct
|
||||
void BATTLE_MultiReLife( int battleindex, int attackNo, int toNo, int power, int RecevEffect );
|
||||
#endif
|
||||
#ifdef _MAGIC_WEAKEN
|
||||
int MAGIC_ParamChange_Turn_Battle(int charaindex,int toNo,int marray,int mp);
|
||||
void BATTLE_MultiParamChangeTurn( int battleindex,int attackNo,int toNo,int status,int UseEffect,int RecevEffect,int turn, int Success);
|
||||
#endif
|
||||
int BATTLE_MagicEffect( int battleindex,int attackNo,int ToList[],int MyEffect,int ToEffect );
|
||||
|
||||
|
||||
|
||||
#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能
|
||||
void PROFESSION_MAGIC_ATTAIC( int battleindex, int attackNo, int toNo, int attIdx, int FieldAttr, int skill);
|
||||
int PROFESSION_MAGIC_ATTAIC_Effect( int battleindex, int attackNo, int ToList[], int AttackMgcNo );
|
||||
int analysis_profession_parameter( int attIdx, int skill, int toNo, int charaindex );
|
||||
void PROFESSION_MAGIC_GET_PRACTICE( float *hp_power, float *mp_power, float *dec_hp, float *dec_mp, int charaindex );
|
||||
void PROFESSION_MAGIC_TOLIST_SORT( int *list, int *listidx, int charaindex );
|
||||
void PROFESSION_MAGIC_CHANGE_STATUS( int charaindex, int hp_power, float mp_power, float *add_hp, float *add_mp );
|
||||
void PROFESSION_MAGIC_GET_IMG2( int toNo, int charaindex, int attIdx, char *pszOption );
|
||||
#ifdef _PROFESSION_ADDSKILL
|
||||
int PROFESSION_MAGIC_GET_DAMAGE( int attackindex, int defindex, int magic_type, int power, int command );
|
||||
#else
|
||||
int PROFESSION_MAGIC_GET_DAMAGE( int attackindex, int defindex, int magic_type, int power );
|
||||
#endif
|
||||
int PROFESSION_MAGIC_DODGE( int atk_index, int def_index, int magic_type );
|
||||
void PROFESSION_MAGIC_CHANG_IMG2( int img2, char *pszOption, int attIdx );
|
||||
int PROFESSION_MAGIC_CHANG_STATUS(int command,int battleindex, int charaindex, int charaidx, int power, int no);
|
||||
int PROFESSION_MAGIC_GET_ICE_MIRROR_DAMAGE( int attackindex, int defindex, int command, int power );
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_FIREKILL
|
||||
void BATTLE_MultiAttMagic_Fire( int battleindex, int attackNo, int defNo,
|
||||
int FieldAttr , int Power);
|
||||
#endif
|
||||
|
||||
#ifdef _PROFESSION_ADDSKILL
|
||||
unsigned int GET_PROFESSION_magic_uiSpriteNum(int idx);
|
||||
#endif
|
||||
|
||||
#endif
|
11
include/buf.h
Normal file
11
include/buf.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef __BUF_H__
|
||||
#define __BUF_H__
|
||||
|
||||
#include "common.h"
|
||||
void memEnd( void );
|
||||
BOOL configmem( int unit , int unitnumber );
|
||||
BOOL memInit( void );
|
||||
void* allocateMemory( const unsigned int nbyte );
|
||||
void freeMemory( void* freepointer );
|
||||
void showMem( char *buf);
|
||||
#endif
|
780
include/char.h
Normal file
780
include/char.h
Normal file
@ -0,0 +1,780 @@
|
||||
#ifndef __CHAR_H__
|
||||
#define __CHAR_H__
|
||||
|
||||
#include "common.h"
|
||||
#include "char_base.h"
|
||||
#include "net.h"
|
||||
#include "char_data.h"
|
||||
|
||||
|
||||
/*------------------------------------------------------------
|
||||
*白巧件玄及缙及烂聒
|
||||
*------------------------------------------------------------*/
|
||||
typedef enum
|
||||
{
|
||||
CHAR_COLORWHITE,
|
||||
CHAR_COLORCYAN,
|
||||
CHAR_COLORPURPLE,
|
||||
CHAR_COLORBLUE,
|
||||
CHAR_COLORYELLOW,
|
||||
CHAR_COLORGREEN,
|
||||
CHAR_COLORRED,
|
||||
CHAR_COLORGRAY,
|
||||
CHAR_COLORBLUE2,
|
||||
CHAR_COLORGREEN2,
|
||||
CHAR_COLORBLACK,
|
||||
}CHAR_COLOR;
|
||||
/*====================平乓仿及综岳卞楮允月楮醒====================*/
|
||||
void CHAR_createNewChar( int clifd, int dataplacenum,char* charname ,
|
||||
int imgno,int faceimgno,
|
||||
int vital,int str,int tgh,int dex,
|
||||
int earth,int water,int fire,int wind,
|
||||
int hometown , char *cdkey );
|
||||
|
||||
/*====================平乓仿及夫弘奶件====================*/
|
||||
|
||||
void CHAR_login( int clifd, char* data, int saveindex );
|
||||
|
||||
#define CHAR_warpToSpecificPoint( cindex, fl, x, y) _CHAR_warpToSpecificPoint( __FILE__, __LINE__, cindex, fl, x, y)
|
||||
BOOL _CHAR_warpToSpecificPoint( char *file, int line,
|
||||
int charaindex, int fl, int x, int y);
|
||||
|
||||
|
||||
/*====================平乓仿及本□皮====================*/
|
||||
/*====================平乓仿及夫弘失它玄====================*/
|
||||
BOOL CHAR_charSaveFromConnectAndChar( int fd,Char* ch, int unlock );
|
||||
BOOL CHAR_charSaveFromConnect( int charaindex,int unlock );
|
||||
#define CHAR_logout( charindex, save) _CHAR_logout( __FILE__, __LINE__, charindex, save)
|
||||
BOOL _CHAR_logout( char *file, int line, int charindex, BOOL save);
|
||||
|
||||
/*====================watch event ====================*/
|
||||
void CHAR_sendWatchEvent( int objindex, int chac, int* opt,int optlen,BOOL myflg );
|
||||
|
||||
/*====================旦平伙====================*/
|
||||
BOOL CHAR_Skillupsend(int charaindex );
|
||||
void CHAR_SkillUp( int charaindex, int skillid );
|
||||
void CHAR_useSkill( int charaindex, int dir ,int skindex );
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CHAR_WALKSUCCESSED, /* 岳 */
|
||||
CHAR_WALKSYSTEMERROR, /* 扑旦 丞巨仿□ 及index民尼永弁卞
|
||||
* 夫匀井井匀凶午井 */
|
||||
CHAR_WALKEXTEND, /* 区左□田□仄化汹仇丹午仄凶[NPC卞及心*/
|
||||
CHAR_WALKHITOBJECT, /* 窒井 卞癫匀化}汹仃卅井匀凶 */
|
||||
CHAR_WALKPREWALK, /* prewalk奶矛件玄匹汹仃卅井匀凶( 檗祭 ) */
|
||||
CHAR_WALKDIE, /* 韶氏匹中化汹仃卅中 */
|
||||
CHAR_WALK1357, /* 标户 轾卞汹仇丹午仄化汹仃卅井匀凶 */
|
||||
}CHAR_WALKRET;
|
||||
|
||||
/*====================平乓仿及啖 卞楮允月楮醒====================*/
|
||||
void CHAR_ctodirmode(char moji , int* dir , int* mode);
|
||||
INLINE void CHAR_getDXDY( int dir , int* dx, int* dy );
|
||||
INLINE int CHAR_getDX( int dir );
|
||||
INLINE int CHAR_getDY( int dir );
|
||||
int CHAR_getSameCoordinateObjects(int* objbuf, int siz,int ff, int fx, int fy);
|
||||
void CHAR_walkcall( int index );
|
||||
void CHAR_walk_start(int index, int x, int y, char* dir, BOOL mapsendmode);
|
||||
void CHAR_walk_init( int fd, int x, int y, char *direction, BOOL mapsendmode);
|
||||
|
||||
CHAR_WALKRET CHAR_walk(int index, int dir, int mode);
|
||||
|
||||
#ifdef _CAX_LNS_NLGSUOXU
|
||||
CHAR_WALKRET CHAR_walk_jjc( int index, int floor, int ox, int oy, int dir);
|
||||
CHAR_WALKRET CHAR_walk_jc( int charaindex, int of, int ox, int oy, int dir );//检查前方障碍
|
||||
#endif
|
||||
|
||||
char* CHAR_makeOptionString( Char* ch );
|
||||
char* CHAR_makeStatusString( int index, char* category );
|
||||
|
||||
#define CHAR_makeObjectCString( objindex, buf, buflen) _CHAR_makeObjectCString( __FILE__, __LINE__, objindex, buf, buflen)
|
||||
BOOL _CHAR_makeObjectCString( char *file, int line, int objindex, char* buf, int buflen );
|
||||
|
||||
//BOOL CHAR_sendStatusString( int charaindex, char* category );
|
||||
#define CHAR_sendStatusString( A, B) _CHAR_sendStatusString( A, B, __FILE__, __LINE__ )
|
||||
BOOL _CHAR_sendStatusString( int charaindex, char* category, char* file, int line );
|
||||
BOOL CHAR_sendItemData( int charaindex, int *itemgroup, int num);
|
||||
BOOL CHAR_sendItemDataOne( int charaindex, int haveitemindex);
|
||||
BOOL CHAR_send_P_StatusString( int charaindex, unsigned int indextable );
|
||||
BOOL CHAR_send_N_StatusString( int charaindex, int num, unsigned int indextable );
|
||||
BOOL CHAR_send_K_StatusString( int charaindex, int num, unsigned int indextable );
|
||||
|
||||
void CHAR_inputOwnTitle( int index ,char* name );
|
||||
|
||||
void CHAR_selectTitle( int index, int titleindex );
|
||||
void CHAR_deleteTitle( int index, int titleindex );
|
||||
|
||||
#define CHAR_complianceParameter( index) _CHAR_complianceParameter( index, __FILE__, __LINE__)
|
||||
int _CHAR_complianceParameter( int index, char *FILE, int LINE);
|
||||
int CHAR_complianceParameter2( int index);
|
||||
|
||||
int CHAR_findSurplusItemBox( int index );
|
||||
int CHAR_findEmptyItemBox( int index );
|
||||
int CHAR_findEmptyPoolItemBox( int index );
|
||||
int CHAR_findEmptyItemBoxNo( int index );
|
||||
|
||||
void CHAR_moveEquipItem( int index, int fromindex, int toindex );
|
||||
#ifdef _PET_ITEM
|
||||
void CHAR_movePetItem( int index, int petid, int fromindex, int toindex );
|
||||
void CHAR_sendPetItemData( int charaindex, int petid);
|
||||
#endif
|
||||
void CHAR_ItemUse( int charaindex, int to_charaindex, int haveitemindex );
|
||||
void CHAR_DropItem( int charaindex, int itemindex );
|
||||
int CHAR_DropItemAbsolute( int itemindex, int floor, int x, int y,BOOL net);
|
||||
BOOL CHAR_DropItemFXY( int charaindex, int itemcharaindex, int fl,
|
||||
int x, int y, int* objindex );
|
||||
int CHAR_addItemSpecificItemIndex( int charaindex, int itemindex );
|
||||
|
||||
void CHAR_PickUpItem( int charaindex, int dir );
|
||||
void CHAR_DropMoney( int charaindex, int amount );
|
||||
int CHAR_addItem( int charaindex, int itemid );
|
||||
int CHAR_addItemToChar( Char* ch, int itemid );
|
||||
|
||||
int CHAR_pickupFollowPet( int charaindex, int petindex );
|
||||
|
||||
#ifdef _GAMBLE_ROULETTE
|
||||
int NPC_MAPCLEANGOLD( int meindex , int floor);
|
||||
#endif
|
||||
|
||||
#ifdef _DROPSTAKENEW
|
||||
#define MAXSTAKENUM 5
|
||||
int CasinoAccumulation(int charindex, int npcindex, int floor, int wincasinotype);
|
||||
void CHAR_talkToFloor(int floor, int talkindex, char* message, CHAR_COLOR color);
|
||||
int SetCasinoMap(int npcindex, int casinotype, int mapdropflag);
|
||||
int CasinoPay(int npcindex, int wincasinotype);
|
||||
#endif
|
||||
|
||||
void CHAR_sendCSpecifiedObjindex( int fd, int index);
|
||||
void CHAR_sendSpecifiedobjindexCToCharaindex(int charaindex,int objindex);
|
||||
|
||||
void CHAR_sendCToArroundCharacter( int charaindex );
|
||||
|
||||
void CHAR_sendArroundCharaData( int charaindex );
|
||||
|
||||
void CHAR_sendCDArroundChar( int fl, int x, int y, int objindex );
|
||||
void CHAR_sendCDArroundChar_Main( int fl, int x, int y, int objindex, BOOL mode );
|
||||
|
||||
|
||||
void CHAR_Look( int charaindex, int dir );
|
||||
|
||||
void CHAR_initChatMagic(void);
|
||||
|
||||
char* CHAR_appendNameAndTitle( int charaindex, char* src, char* buf,
|
||||
int buflen );
|
||||
void CHAR_Talk( int fd, int index,char* message,int color, int area );
|
||||
|
||||
void CHAR_Loop( void );
|
||||
|
||||
#ifdef _PET_ITEM
|
||||
void CHAR_sendPetItemData( int charaindex, int petid);
|
||||
void CHAR_sendPetItemEmpty( int charaindex, int petid);
|
||||
#endif
|
||||
|
||||
#define WINDOW_BUTTONTYPE_NONE (0)
|
||||
#define WINDOW_BUTTONTYPE_OK (1 << 0)
|
||||
#define WINDOW_BUTTONTYPE_CANCEL (1 << 1)
|
||||
#define WINDOW_BUTTONTYPE_YES (1 << 2)
|
||||
#define WINDOW_BUTTONTYPE_NO (1 << 3)
|
||||
#define WINDOW_BUTTONTYPE_PREV (1 << 4)
|
||||
#define WINDOW_BUTTONTYPE_NEXT (1 << 5)
|
||||
|
||||
#define WINDOW_BUTTONTYPE_OKCANCEL (WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_CANCEL)
|
||||
#define WINDOW_BUTTONTYPE_YESNO (WINDOW_BUTTONTYPE_YES | WINDOW_BUTTONTYPE_NO)
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
WINDOW_MESSAGETYPE_MESSAGE,
|
||||
WINDOW_MESSAGETYPE_MESSAGEANDLINEINPUT,
|
||||
WINDOW_MESSAGETYPE_SELECT,
|
||||
WINDOW_MESSAGETYPE_PETSELECT,
|
||||
WINDOW_MESSAGETYPE_PARTYSELECT,
|
||||
WINDOW_MESSAGETYPE_PETANDPARTYSELECT,
|
||||
WINDOW_MESSAGETYPE_ITEMSHOPMENU,
|
||||
WINDOW_MESSAGETYPE_ITEMSHOPMAIN,
|
||||
WINDOW_MESSAGETYPE_LIMITITEMSHOPMAIN,
|
||||
WINDOW_MESSAGETYPE_PETSKILLSHOP,
|
||||
WINDOW_MESSAGETYPE_WIDEMESSAGE,
|
||||
WINDOW_MESSAGETYPE_WIDEMESSAGEANDLINEINPUT,
|
||||
WINDOW_MESSAGETYPE_POOLITEMSHOPMENU,
|
||||
WINDOW_MESSAGETYPE_POOLITEMSHOPMAIN,
|
||||
|
||||
WINDOW_MESSAGETYPE_FAMILYADD,
|
||||
WINDOW_MESSAGETYPE_FAMILYJOIN,
|
||||
WINDOW_MESSAGETYPE_FAMILYOUT,
|
||||
WINDOW_MESSAGETYPE_FAMILYEND,
|
||||
//=======================================
|
||||
// shan add
|
||||
WINDOW_FMMESSAGETYPE_SELECT,
|
||||
WINDOW_FMMESSAGETYPE_DENGON,
|
||||
WINDOW_FMMESSAGETYPE_FMSDENGON,
|
||||
WINDOW_FMMESSAGETYPE_POINTLIST,
|
||||
#ifdef _FMVER21
|
||||
WINDOW_FMMESSAGETYPE_TOP30DP,
|
||||
#endif
|
||||
WINDOW_FMMESSAGETYPE_DP,
|
||||
WINDOW_MESSAGETYPE_BANK,
|
||||
|
||||
// Arminius 7.12 scheduleman
|
||||
WINDOW_MESSAGETYPE_PKSCHEDULELIST,
|
||||
WINDOW_MESSAGETYPE_PKSCHEDULESELECTFAMILY,
|
||||
WINDOW_MESSAGETYPE_PKSCHEDULEDETAIL,
|
||||
|
||||
// Robin
|
||||
WINDOW_MESSAGETYPE_LOGINMESSAGE,
|
||||
WINDOW_MESSAGETYPE_FAMILYTAX,
|
||||
WINDOW_MESSAGETYPE_SHOWRIDEPET,
|
||||
WINDOW_MESSAGETYPE_FAMILYDETAIL,
|
||||
|
||||
WINDOW_MESSAGETYPE_LEADERSELECT,
|
||||
WINDOW_MESSAGETYPE_LEADERSELECTQ,
|
||||
WINDOW_MESSAGETYPE_LEADERSELECTA,
|
||||
|
||||
// Arminius 1.3 Auctioneer
|
||||
WINDOW_MESSAGETYPE_AUCTIONNEW,
|
||||
WINDOW_MESSAGETYPE_AUCTIONLIST_BUY,
|
||||
WINDOW_MESSAGETYPE_AUCTIONSURVEY,
|
||||
WINDOW_MESSAGETYPE_AUCTIONMODIFY,
|
||||
WINDOW_MESSAGETYPE_AUCTIONLIST_MODIFY,
|
||||
#ifdef _NPC_FUSION
|
||||
WINDOWS_MESSAGETYPE_PETFUSION,
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_CANNEDFOOD
|
||||
WINDOWS_MESSAGETYPE_PETSKILLSHOW,
|
||||
#endif
|
||||
|
||||
#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能
|
||||
WINDOW_MESSAGETYPE_PROFESSIONSHOP,
|
||||
#endif
|
||||
|
||||
#ifdef _NEW_MANOR_LAW
|
||||
WINDOW_FMMESSAGETYPE_10_MEMONTUM, // 十大气势家族
|
||||
WINDOW_FMMESSAGETYPE_FM_MEMONTUM, // 自己家族气势排名
|
||||
WINDOW_FMMESSAGETYPE_MANOR_SCHEDULE, // 挑战庄园排行
|
||||
#endif
|
||||
|
||||
#ifdef _ANGEL_SUMMON
|
||||
WINDOW_MESSAGETYPE_ANGELMESSAGE = 101,
|
||||
WINDOW_MESSAGETYPE_ANGELASK,
|
||||
#endif
|
||||
|
||||
#ifdef _MOUSE_DBL_CLICK
|
||||
WINDOW_MESSAGETYPE_MOUSEGETNAME,
|
||||
#endif
|
||||
|
||||
#ifdef _RACEMAN
|
||||
WINDOW_MESSAGETYPE_RACEMAN_RANK,
|
||||
#endif
|
||||
|
||||
WINDOW_MESSAGETYPE_RANDMSG_PIC=999,
|
||||
|
||||
}WINDOW_MESSAGETYPE;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CHAR_WINDOWTYPE_RETURNTOELDER=-1, /* 赢 尺 月它奴件玉它 */
|
||||
CHAR_WINDOWTYPE_RESURRECTION=-2, /* 汊唾允月它奴件玉它 */
|
||||
|
||||
CHAR_WINDOWTYPE_SELECTBATTLE = 1, /* 月爵 毛蓟 允月它奴件玉它 */
|
||||
CHAR_WINDOWTYPE_SELECTDUEL = 2, /* 月DUEL毛蓟 允月它奴件玉它 */
|
||||
CHAR_WINDOWTYPE_SELECTTRADECARD = 3, /* 铜跟晶毛蓟 允月它奴件玉它 */
|
||||
CHAR_WINDOWTYPE_SELECTPARTY = 4, /* 由□ 奴毛蓟 允月它奴件玉它 */
|
||||
CHAR_WINDOWTYPE_SELECTBATTLEWATCH = 5, /* 棋爵毛蓟 允月它奴件玉它 */
|
||||
CHAR_WINDOWTYPE_MICMESSAGE = 6, /* MICNPC毛银匀化请月它奴件玉它 */
|
||||
|
||||
// CoolFish: Trade 2001/4/18
|
||||
CHAR_WINDOWTYPE_SELECTTRADE = 7, /* 交易 Window */
|
||||
|
||||
CHAR_WINDOWTYPE_SELECTRENAMEITEM_PAGE1 = 10, /* 蟆毛 凳允月失奶 丞毛蓟 允月它奴件玉它 */
|
||||
CHAR_WINDOWTYPE_SELECTRENAMEITEM_PAGE2 = 11, /* 蟆毛 凳允月失奶 丞毛蓟 允月它奴件玉它 */
|
||||
CHAR_WINDOWTYPE_SELECTRENAMEITEM_PAGE3 = 12, /* 蟆毛 凳允月失奶 丞毛蓟 允月它奴件玉它 */
|
||||
CHAR_WINDOWTYPE_SELECTRENAMEITEM_PAGE4 = 13, /* 蟆毛 凳允月失奶 丞毛蓟 允月它奴件玉它 */
|
||||
CHAR_WINDOWTYPE_SELECTRENAMEITEM_RENAME = 14, /* 蟆毛 允月它奴件玉它 */
|
||||
CHAR_WINDOWTYPE_SELECTRENAMEITEM_RENAME_ATTENTION = 15, /* 蟆毛 允月它奴件玉它 */
|
||||
|
||||
CHAR_WINDOWTYPE_DENGON = 50, /* 鳗蜕 */
|
||||
|
||||
CHAR_WINDOWTYPE_WINDOWMAN_START = 100,
|
||||
CHAR_WINDOWTYPE_WINDOWMAN_STARTMSG = CHAR_WINDOWTYPE_WINDOWMAN_START,
|
||||
CHAR_WINDOWTYPE_WINDOWMAN_END = 200,
|
||||
|
||||
CHAR_WINDOWTYPE_JANKEN_START = 210,
|
||||
CHAR_WINDOWTYPE_JANKEN_MAIN = 211,
|
||||
CHAR_WINDOWTYPE_JANKEN_END = 212,
|
||||
|
||||
CHAR_WINDOWTYPE_TRANSMIGRATION_START = 213,
|
||||
CHAR_WINDOWTYPE_TRANSMIGRATION_MAIN = 214,
|
||||
CHAR_WINDOWTYPE_TRANSMIGRATION_END = 215,
|
||||
CHAR_WINDOWTYPE_TRANSMIGRATION_NONE = 216,
|
||||
|
||||
|
||||
CHAR_WINDOWTYPE_WINDOWHEALER_START = 220,
|
||||
CHAR_WINDOWTYPE_WINDOWHEALER_STARTMSG = CHAR_WINDOWTYPE_WINDOWHEALER_START,
|
||||
CHAR_WINDOWTYPE_WINDOWHEALER_HPMSG = 221,
|
||||
CHAR_WINDOWTYPE_WINDOWHEALER_OKHPMSG = 222,
|
||||
CHAR_WINDOWTYPE_WINDOWHEALER_SPIRITMSG = 223,
|
||||
CHAR_WINDOWTYPE_WINDOWHEALER_OKSPIRITMSG = 224,
|
||||
CHAR_WINDOWTYPE_WINDOWHEALER_ALLMSG = 225,
|
||||
CHAR_WINDOWTYPE_WINDOWHEALER_OKALLMSG = 226,
|
||||
CHAR_WINDOWTYPE_WINDOWHEALER_END = 227,
|
||||
|
||||
CHAR_WINDOWTYPE_WINDOWSAVEPOINT_START = 230,
|
||||
|
||||
CHAR_WINDOWTYPE_WINDOWEVENT_STARTMSG = 231,
|
||||
CHAR_WINDOWTYPE_WINDOWEVENT_NOWEVENT = 232,
|
||||
CHAR_WINDOWTYPE_WINDOWEVENT_ENDEVENT = 233,
|
||||
CHAR_WINDOWTYPE_WINDOWEVENT_REQMAINMSG = 234,
|
||||
CHAR_WINDOWTYPE_WINDOWEVENT_ACCMAINMSG = 235,
|
||||
CHAR_WINDOWTYPE_WINDOWEVENT_NOMALMSG = 236,
|
||||
CHAR_WINDOWTYPE_WINDOWEVENT_CLEANMSG = 237,
|
||||
CHAR_WINDOWTYPE_WINDOWEVENT_REQTHANK = 238,
|
||||
CHAR_WINDOWTYPE_WINDOWEVENT_ACCTHANK = 239,
|
||||
|
||||
|
||||
CHAR_WINDOWTYPE_WINDOWITEMSHOP_START = 240,
|
||||
CHAR_WINDOWTYPE_WINDOWITEMSHOP_STARTMSG = CHAR_WINDOWTYPE_WINDOWITEMSHOP_START,
|
||||
CHAR_WINDOWTYPE_WINDOWITEMSHOP_MENU = 241,
|
||||
CHAR_WINDOWTYPE_WINDOWITEMSHOP_BUY_MSG = 242,
|
||||
CHAR_WINDOWTYPE_WINDOWITEMSHOP_SELL_MSG = 243,
|
||||
CHAR_WINDOWTYPE_WINDOWITEMSHOP_END = 244,
|
||||
CHAR_WINDOWTYPE_WINDOWITEMSHOP_LIMIT = 245,
|
||||
CHAR_WINDOWTYPE_WINDOWITEMSHOP_EXPRESS = 246,
|
||||
|
||||
CHAR_WINDOWTYPE_DUELRANKING_START = 250,
|
||||
CHAR_WINDOWTYPE_DUELRANKING_TOPRANKING = 251,
|
||||
CHAR_WINDOWTYPE_DUELRANKING_MYRANKING = 252,
|
||||
CHAR_WINDOWTYPE_DUELRANKING_WAIT = 253,
|
||||
CHAR_WINDOWTYPE_DEFEND_BILLDBOARD = 254,
|
||||
|
||||
CHAR_WINDOWTYPE_WINDOWPETSKILLSHOP = 260,
|
||||
|
||||
CHAR_WINDOWTYPE_WINDOWPETSHOP_START = 261,
|
||||
CHAR_WINDOWTYPE_WINDOWPETSHOP_PETSELECT = 262,
|
||||
CHAR_WINDOWTYPE_WINDOWPETSHOP_MAIN = 263,
|
||||
CHAR_WINDOWTYPE_WINDOWPETSHOP_GOLDOVER = 264,
|
||||
CHAR_WINDOWTYPE_WINDOWPETSHOP_PETSELECT2 = 265,
|
||||
CHAR_WINDOWTYPE_WINDOWPETSHOP_MAIN2 = 266,
|
||||
CHAR_WINDOWTYPE_WINDOWPETSHOP_DRAWSELECT = 267,
|
||||
CHAR_WINDOWTYPE_WINDOWPETSHOP_ASKDRAW = 268,
|
||||
CHAR_WINDOWTYPE_WINDOWPETSHOP_END = 269,
|
||||
|
||||
CHAR_WINDOWTYPE_WINDOWWARPMAN_MAIN = 271,
|
||||
CHAR_WINDOWTYPE_WINDOWWARPMAN_ERR = 272,
|
||||
CHAR_WINDOWTYPE_WINDOWWARPMAN_END = 273,
|
||||
|
||||
CHAR_WINDOWTYPE_NPCENEMY_START = 281,
|
||||
|
||||
CHAR_WINDOWTYPE_CHARM_START = 282,
|
||||
CHAR_WINDOWTYPE_CHARM_END = 283,
|
||||
|
||||
CHAR_WINDOWTYPE_QUIZ_START = 284,
|
||||
CHAR_WINDOWTYPE_QUIZ_MAIN = 285,
|
||||
CHAR_WINDOWTYPE_QUIZ_END = 286,
|
||||
|
||||
CHAR_WINDOWTYPE_CHECKMAN_START = 287,
|
||||
CHAR_WINDOWTYPE_CHECKMAN_MAIN = 288,
|
||||
CHAR_WINDOWTYPE_CHECKMAN_END = 289,
|
||||
|
||||
CHAR_WINDOWTYPE_FAMILYMAN_START = 320,
|
||||
CHAR_WINDOWTYPE_FAMILYMAN_ADD = 321,
|
||||
CHAR_WINDOWTYPE_FAMILYMAN_JOIN = 322,
|
||||
CHAR_WINDOWTYPE_FAMILYMAN_OUT = 323,
|
||||
CHAR_WINDOWTYPE_FAMILYMAN_BROKEN = 324,
|
||||
|
||||
CHAR_WINDOWTYPE_BANKMAN = 330,
|
||||
|
||||
// CoolFish: FMPKMan 2001/7/4
|
||||
CHAR_WINDOWTYPE_FMPKMAN_START = 340,
|
||||
CHAR_WINDOWTYPE_FMPKMAN_VIEW = 341,
|
||||
CHAR_WINDOWTYPE_FMPKMAN_LEAVEPK = 342,
|
||||
CHAR_WINDOWTYPE_FMPKCALLMAN_START = 345,
|
||||
CHAR_WINDOWTYPE_FMPKCALLMAN_CALL = 346,
|
||||
CHAR_WINDOWTYPE_FMPKCALLMAN_COME = 347,
|
||||
CHAR_WINDOWTYPE_FMPKCALLMAN_LEAVE = 348,
|
||||
|
||||
// Arminius 7.13 scheduleman
|
||||
CHAR_WINDOWTYPE_SCHEDULEMAN_START = 350,
|
||||
CHAR_WINDOWTYPE_SCHEDULEMAN_SELECT = 351,
|
||||
CHAR_WINDOWTYPE_SCHEDULEMAN_DETAIL = 352,
|
||||
|
||||
// Arminius 7.27
|
||||
CHAR_WINDOWTYPE_MANORPK_START = 360,
|
||||
CHAR_WINDOWTYPE_MANORPK_ASK = 361,
|
||||
CHAR_WINDOWTYPE_MANORPK_END = 362,
|
||||
|
||||
// shan
|
||||
CHAR_WINDOWTYPE_FM_DENGON = 370, // 家族留言板
|
||||
CHAR_WINDOWTYPE_FM_FMSDENGON = 371, // 家族之间留言板
|
||||
CHAR_WINDOWTYPE_FM_MESSAGE1 = 372, // 说明视窗(据点)
|
||||
CHAR_WINDOWTYPE_FM_MESSAGE2 = 373, // 说明视窗(成员)
|
||||
CHAR_WINDOWTYPE_FM_SELECT = 374, // 选项视窗
|
||||
CHAR_WINDOWTYPE_FM_MEMBERLIST = 375, // 成员列表
|
||||
CHAR_WINDOWTYPE_FM_POINTLIST = 376, // 据点列表
|
||||
CHAR_WINDOWTYPE_FM_DPTOP = 377, // 强者表(前叁十大列榜)
|
||||
CHAR_WINDOWTYPE_FM_DPME = 378, // 强者表(自己的列榜)
|
||||
CHAR_WINDOWTYPE_FM_DPSELECT = 379, // 强者表的选项视窗
|
||||
|
||||
#ifdef _PET_TRANS
|
||||
CHAR_WINDOWTYPE_PETTRANS_START = 384,
|
||||
CHAR_WINDOWTYPE_PETTRANS_SELECT = 385,
|
||||
CHAR_WINDOWTYPE_PETTRANS_SELPET = 386,
|
||||
CHAR_WINDOWTYPE_PETTRANS_MAIN1 = 387,
|
||||
CHAR_WINDOWTYPE_PETTRANS_END = 389,
|
||||
#endif
|
||||
|
||||
#ifdef _GAMBLE_BANK
|
||||
NPC_GambleBank_START = 390,
|
||||
NPC_GambleBank_SELECT,
|
||||
NPC_GambleBank_BANK,
|
||||
NPC_GambleBank_CHANG1,
|
||||
NPC_GambleBank_CHANG2,
|
||||
NPC_GambleBank_END,
|
||||
#endif
|
||||
|
||||
#ifdef _PETRACE
|
||||
CHAR_WINDOWTYPE_PETRACEMASTER_START = 410,
|
||||
CHAR_WINDOWTYPE_PETRACEMASTER_RULE,
|
||||
CHAR_WINDOWTYPE_PETRACEMASTER_PET,
|
||||
CHAR_WINDOWTYPE_PETRACEMASTER_LEAVE,
|
||||
#endif
|
||||
|
||||
#ifdef _GAMBLE_ROULETTE
|
||||
WINDOWTYPE_GAMBLEROULETTE_START = 415,
|
||||
WINDOWTYPE_GAMBLEROULETTE_SELECT,
|
||||
WINDOWTYPE_GAMBLEROULETTE_END,
|
||||
#endif
|
||||
|
||||
#ifdef _NEWEVENT
|
||||
CHAR_WINDOWTYPE_WINDOWEVENT_ACCTHANKNEW = 430,
|
||||
#endif
|
||||
|
||||
#ifdef _TRANSER_MAN
|
||||
NPC_TRANSERMAN_START = 440,
|
||||
NPC_TRANSERMAN_SELECT,
|
||||
NPC_TRANSERMAN_WARP,
|
||||
NPC_TRANSERMAN_END,
|
||||
#endif
|
||||
#ifdef _ITEM_NPCCHANGE
|
||||
NPC_ITEMCHANGE_START = 445,
|
||||
NPC_ITEMCHANGE_SELECT,
|
||||
NPC_ITEMCHANGE_MESSAGE,
|
||||
NPC_ITEMCHANGE_END,
|
||||
#endif
|
||||
#ifdef _ADD_FAMILY_TAX // WON ADD 增加庄园税收
|
||||
CHAR_WINDOWTYPE_FAMILY_TAX = 450,
|
||||
#endif
|
||||
|
||||
#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC
|
||||
NPC_ALLDOMAN_START = 460,
|
||||
NPC_ALLDOMAN_START2,
|
||||
NPC_ALLDOMAN_START3,
|
||||
NPC_ALLDOMAN_HEAL,
|
||||
NPC_ALLDOMAN_GIVEMONEY,
|
||||
NPC_ALLDOMAN_MAIN_WND ,
|
||||
NPC_ALLDOMAN_SELECT_WND ,
|
||||
NPC_ALLDOMAN_LIST_WND ,
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_CANNEDFOOD
|
||||
ITEM_WINDOWTYPE_SELECTPETSKILL_SELECT = 470,
|
||||
ITEM_WINDOWTYPE_SELECTPETSKILL_END,
|
||||
#endif
|
||||
|
||||
#ifdef _NPC_WELFARE
|
||||
NPC_WELFARE_START = 480,
|
||||
NPC_WELFARE_END,
|
||||
#endif
|
||||
|
||||
#ifdef _NPC_DEPOTPET
|
||||
CHAR_WINDOWTYPE_DEPOTPETSHOP_MENU = 510,
|
||||
CHAR_WINDOWTYPE_DEPOTPETSHOP_HANDLE,
|
||||
CHAR_WINDOWTYPE_DEPOTPETSHOP_ADD,
|
||||
CHAR_WINDOWTYPE_DEPOTPETSHOP_GET,
|
||||
CHAR_WINDOWTYPE_DEPOTPETSHOP_ASKADD,
|
||||
CHAR_WINDOWTYPE_DEPOTPETSHOP_ASKGET,
|
||||
#endif
|
||||
|
||||
#ifdef _ANGEL_SUMMON
|
||||
CHAR_WINDOWTYPE_ANGEL_ASK = 520,
|
||||
CHAR_WINDOWTYPE_ANGEL_CLEAN,
|
||||
#endif
|
||||
|
||||
#ifdef _SAFE_PASSWORD
|
||||
CHAR_WINDOWTYPE_SAFE_PASSWORD1 = 530,
|
||||
CHAR_WINDOWTYPE_SAFE_PASSWORD2 = 540,
|
||||
CHAR_WINDOWTYPE_SAFE_PASSWORD3,
|
||||
#endif
|
||||
|
||||
#ifdef _POINT_CARD
|
||||
CHAR_WINDOWTYPE_POINT_CARD = 550,
|
||||
#endif
|
||||
CHAR_WINDOWTYPE_RAND_WARP = 560,
|
||||
CHAR_WINDOWTYPE_RAND_MSG = 561,
|
||||
CHAR_WINDOWTYPE_ITEM_MSG = 562,
|
||||
|
||||
CHAR_STREETVENDOR_SELECT = 570,
|
||||
CHAR_WINDOWTYPE_QUESTIONONLINE = 580,
|
||||
#ifdef _SQL_BUY_FUNC
|
||||
CHAR_WINDOWTYPE_ONLINE_BUY,
|
||||
#endif
|
||||
#ifdef _PET_RESET
|
||||
CHAR_WINDOWTYPE_RESETPET,
|
||||
CHAR_WINDOWTYPE_RESETBDPET,
|
||||
#endif
|
||||
#ifdef _ZHIPIAO_SYSTEM
|
||||
CHAR_WINDOWTYPE_ZHIPIAO_1,
|
||||
CHAR_WINDOWTYPE_ZHIPIAO_2,
|
||||
CHAR_WINDOWTYPE_ZHIPIAO_3,
|
||||
#endif
|
||||
#ifdef _NO_DROPITEM
|
||||
CHAR_WINDOWTYPE_DROPITEM,
|
||||
#endif
|
||||
#ifdef _NPC_ITEMUP
|
||||
NPC_ITEMUP_START,
|
||||
NPC_ITEMUP_SELECT1,
|
||||
NPC_ITEMUP_SELECT2,
|
||||
NPC_ITEMUP_MESSAGE,
|
||||
NPC_ITEMUP_END,
|
||||
#endif
|
||||
#ifdef _ITEM_RESET
|
||||
CHAR_WINDOWTYPE_RESETITEM,
|
||||
CHAR_WINDOWTYPE_DELITEM,
|
||||
#endif
|
||||
CHAR_WINDOWTYPE_RAND1_EDITBASE,
|
||||
CHAR_WINDOWTYPE_RAND2_EDITBASE,
|
||||
CHAR_WINDOWTYPE_RAND3_EDITBASE,
|
||||
CHAR_WINDOWTYPE_RAND4_EDITBASE,
|
||||
#ifdef _MM_NO_JIAOBEN
|
||||
CHAR_WINDOWTYPE_RAND1_DROPMM,
|
||||
CHAR_WINDOWTYPE_RAND2_DROPMM,
|
||||
CHAR_WINDOWTYPE_RAND3_DROPMM,
|
||||
CHAR_WINDOWTYPE_RAND4_DROPMM,
|
||||
CHAR_WINDOWTYPE_RAND1_FLLOWMM,
|
||||
CHAR_WINDOWTYPE_RAND2_FLLOWMM,
|
||||
CHAR_WINDOWTYPE_RAND3_FLLOWMM,
|
||||
CHAR_WINDOWTYPE_RAND4_FLLOWMM,
|
||||
#endif
|
||||
#ifdef _FM_NPC_LOOK_WAR
|
||||
NPC_FMLOOKWARMAN_START,
|
||||
NPC_FMLOOKWARMAN_SELECT,
|
||||
NPC_FMLOOKWARMAN_LOOK,
|
||||
#endif
|
||||
#ifdef _FM_NPC_LOOK_WAR1
|
||||
NPC_FMLOOKWARMAN1_START,
|
||||
NPC_FMLOOKWARMAN1_SELECT,
|
||||
NPC_FMLOOKWARMAN1_LOOK,
|
||||
#endif
|
||||
#ifdef _DP_ZHIPIAO_ITEM
|
||||
CHAR_WINDOWTYPE_DPZHIPIAO_1,
|
||||
CHAR_WINDOWTYPE_DPZHIPIAO_2,
|
||||
CHAR_WINDOWTYPE_DPZHIPIAO_3,
|
||||
#endif
|
||||
#ifdef _NPC_RAND_MSG
|
||||
CHAR_WINDOWTYPE_NPC_RAND1_MSG,
|
||||
CHAR_WINDOWTYPE_NPC_RAND2_MSG,
|
||||
CHAR_WINDOWTYPE_NPC_RAND3_MSG,
|
||||
CHAR_WINDOWTYPE_NPC_RAND4_MSG,
|
||||
#endif
|
||||
CHAR_WINDOWTYPE_NPCENEMY_RAND_MSG,
|
||||
CHAR_WINDOWTYPE_LUANPC_RANDMSG,
|
||||
#ifdef _NULL_CHECK_ITEM
|
||||
CHAR_WINDOWTYPE_NULL_CHECK,
|
||||
#endif
|
||||
}CHAR_WINDOWTYPE;
|
||||
|
||||
#ifdef _GMRELOAD
|
||||
typedef struct tagGMInfo
|
||||
{
|
||||
char cdkey[24];
|
||||
int level;
|
||||
}GMInfo;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _ANGEL_SUMMON
|
||||
|
||||
#define MAXMISSION 100
|
||||
#define MAXMISSIONTABLE 200
|
||||
|
||||
struct MissionInfo
|
||||
{
|
||||
int id;
|
||||
char detail[1024];
|
||||
int level;
|
||||
char eventflag[1024];
|
||||
//char bonus[1024];
|
||||
int limittime;
|
||||
};
|
||||
|
||||
struct MissionTable
|
||||
{
|
||||
char angelinfo[128];
|
||||
char heroinfo[128];
|
||||
int mission;
|
||||
int flag;
|
||||
int time;
|
||||
int limittime;
|
||||
};
|
||||
|
||||
extern struct MissionInfo missionlist[MAXMISSION];
|
||||
extern struct MissionTable missiontable[MAXMISSIONTABLE];
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _JOBDAILY
|
||||
|
||||
#define MAXDAILYLIST 1000
|
||||
#define MAXMISSIONFLAG 1000
|
||||
typedef struct _DailyFileType
|
||||
{
|
||||
int jobid; //任务编号
|
||||
char rule[64]; //条件判断
|
||||
char explain[64]; //任务说明
|
||||
char state[64]; //状态说明
|
||||
}DailyFileType;
|
||||
//extern struct DailyFileType dailyfile[MAXDAILYLIST];
|
||||
|
||||
#endif
|
||||
|
||||
BOOL CHAR_talkToCli( int talkedcharaindex,int talkcharaindex, char* message, CHAR_COLOR color );
|
||||
void system_all_talk( char* data );
|
||||
void player_all_talk( int charaindex, char* data );
|
||||
void CHAR_talkToCliAndParty( int talkedcharaindex,int talkcharaindex,char* message, CHAR_COLOR color );
|
||||
|
||||
BOOL CHAR_talkToCharacter( int talkedcharaindex,int talkcharaindex, char* message );
|
||||
void CHAR_getCoordinationDir( int dir , int x, int y ,int c,
|
||||
int *xout , int *yout );
|
||||
BOOL CHAR_createCharacter( int type, int floor, int x, int y, int dir,
|
||||
int* charaindex, int* objindex, BOOL seemap );
|
||||
void CHAR_CharaDelete( int charaindex );
|
||||
void CHAR_ObjectDelete( int objindex );
|
||||
int CHAR_makeDBKey( int charaindex, char *pszBuffer, int size );
|
||||
int CHAR_getEmptyPartyArray( int charaindex);
|
||||
int CHAR_getPartyNum( int charaindex);
|
||||
BOOL CHAR_JoinParty( int charaindex );
|
||||
BOOL CHAR_JoinParty_Main( int charaindex, int targetindex);
|
||||
BOOL CHAR_DischargeParty( int charaindex, int flg);
|
||||
BOOL CHAR_DischargePartyNoMsg( int charaindex);
|
||||
BOOL CHAR_setMyPosition_main( int index, int x, int y, int setdir, BOOL CAFlg);
|
||||
BOOL CHAR_setMyPosition( int index, int x, int y, BOOL CAFlg);
|
||||
|
||||
void CHAR_CharaDeleteHavePet( int charaindex);
|
||||
int CHAR_sendAction( int charaindex, int action, int mode);
|
||||
void CHAR_sendLeader( int objindex, int leader);
|
||||
void CHAR_sendBattleWatch( int objindex, int onoff);
|
||||
void CHAR_sendBattleEffect( int charaindex, int onoff);
|
||||
|
||||
// shan
|
||||
void CHAR_sendTradeEffect( int charaindex, int onoff);
|
||||
#ifdef _MIND_ICON
|
||||
void CHAR_sendMindEffect( int charaindex, int onoff);
|
||||
#endif
|
||||
#ifdef _ITEM_CRACKER
|
||||
void CHAR_sendCrackerEffect( int charaindex, int onoff);
|
||||
#endif
|
||||
|
||||
void CHAR_inputUserPetName( int index , int havepetindex, char* name );
|
||||
int CHAR_getPartyIndex( int index, int num);
|
||||
void CHAR_processWindow(int charaindex, int seqno, int select,
|
||||
int objindex, char* data );
|
||||
void CHAR_AddCharm( int charaindex, int iValue );
|
||||
void CHAR_PetAddVariableAi( int petindex, int iValue );
|
||||
void CHAR_PartyUpdate( int charaindex, int senddata );
|
||||
char *CHAR_getUseName( int charaindex );
|
||||
char *CHAR_getUseID( int charaindex );
|
||||
EXTERN int EnemyMoveNum; /* 凛卞 嫖 仃月衬及醒 */
|
||||
|
||||
#define DB_DUELPOINT "db_duel" // 犯亘巨伙禾奶件玄犯□正矛□旦
|
||||
#define DB_ADDRESSBOOK "db_addressbook" // 失玉伊旦皮永弁犯□正矛□旦
|
||||
|
||||
BOOL CHAR_send_DpDBUpdate( int charaindex );
|
||||
BOOL CHAR_send_DpDBUpdate_AddressBook( int charaindex, int mode );
|
||||
|
||||
|
||||
void CHAR_sendPMEToArroundCharacter( int charaindex, int petindex, int flg, int no );
|
||||
void CHAR_sendPMEToArroundCharacterFLXY( int petindex,
|
||||
int fl, int x, int y, int dir, int flg, int no );
|
||||
|
||||
void CHAR_sendSEoArroundCharacter( int fl, int x, int y, int senumber, int sw );
|
||||
|
||||
BOOL CHAR_initEffectSetting( char* filename );
|
||||
void CHAR_checkEffect( int charaindex);
|
||||
void CHAR_checkEffectLoop( void);
|
||||
void CHAR_initDebugChatCdkey( void);
|
||||
int CHAR_setChatMagicCDKey( int mode, char *cdkey);
|
||||
|
||||
|
||||
float GetRecoveryRate( int charaindex );
|
||||
int storeCharaData( void );
|
||||
#ifdef _MAGIC_REHPAI //补血AI
|
||||
int Magic_RideGetHP( int toindex, int petindex, int flg);
|
||||
#endif
|
||||
// CoolFish: Trade 2001/4/18
|
||||
int CHAR_findTotalEmptyItem(int index);
|
||||
|
||||
|
||||
#ifdef _FIX_METAMORIDE
|
||||
int CHAR_CHECKJOINENEMY( int index);
|
||||
#endif
|
||||
|
||||
#ifdef _SEND_EFFECT // WON ADD AC送下雪、下雨等特效
|
||||
#define CHAR_EFFECT_SETTINGBUFFER 256
|
||||
typedef struct tagCHAR_effectsetting
|
||||
{
|
||||
int floor; // 白夫失
|
||||
int effect; // 梢请 寞
|
||||
int level; // 梢请及伊矛伙[ 蜇及雄今[
|
||||
int sendflg; // 憎巨白尼弁玄毛霜匀凶井升丹井[
|
||||
char month[CHAR_EFFECT_SETTINGBUFFER]; // 垫允月畸
|
||||
char day[CHAR_EFFECT_SETTINGBUFFER]; // 垫允月
|
||||
char hour[CHAR_EFFECT_SETTINGBUFFER]; // 垫允月凛棉
|
||||
char min[CHAR_EFFECT_SETTINGBUFFER]; // 垫允月坌
|
||||
char expire[CHAR_EFFECT_SETTINGBUFFER]; // 垫仄化中月赢今[(
|
||||
|
||||
}CHAR_effectsetting;
|
||||
|
||||
CHAR_effectsetting* CHAR_effect;
|
||||
int CHAR_effectnum;
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_PILENUMS
|
||||
int CHAR_getMyMaxPilenum( int charaindex);
|
||||
#endif
|
||||
|
||||
#ifdef _PET_LOSTPET
|
||||
BOOL CHAR_CharSaveLostPet( int petindex, int type);
|
||||
#endif
|
||||
#ifdef _ALLDOMAN
|
||||
void InitHeroList( void);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _STREET_VENDOR
|
||||
void CHAR_sendStreetVendor(int charaindex,char *message);
|
||||
void CHAR_sendStreetVendorDataToCli(int charaindex,int toindex);
|
||||
void CHAR_sendStreetVendorOneDataToCli(int charaindex,int toindex,int sendindex);
|
||||
#endif
|
||||
|
||||
BOOL checkUnlawWarpFloor( int floor);
|
||||
|
||||
#ifdef _HELP_NEWHAND
|
||||
void CHAR_loginAddItemForNew( int charaindex );
|
||||
#endif
|
||||
|
||||
#ifdef _JOBDAILY
|
||||
void CHAR_JobDaily(int charaindex,char *data);
|
||||
#endif
|
||||
|
||||
#ifdef _TEACHER_SYSTEM
|
||||
void CHAR_Teacher_system(int charaindex,char *data);
|
||||
void CHAR_Teacher_system_View(int charaindex,int iOnLine,char *data);
|
||||
#endif
|
||||
|
||||
#ifdef _TIME_TICKET
|
||||
void check_TimeTicket();
|
||||
int check_TimeTicketMap(int floor);
|
||||
#endif
|
||||
|
||||
void CHAR_CheckItemTime( int charaindex );
|
||||
void CHAR_loginCheckUserItem( int charaindex);
|
2072
include/char_base.h
Normal file
2072
include/char_base.h
Normal file
File diff suppressed because it is too large
Load Diff
126
include/char_data.h
Normal file
126
include/char_data.h
Normal file
@ -0,0 +1,126 @@
|
||||
#ifndef __CHAR_DATA_H__
|
||||
#define __CHAR_DATA_H__
|
||||
|
||||
#include "item.h"
|
||||
#include "char.h"
|
||||
|
||||
|
||||
#define CHAR_CLASS01_PASSLV 20
|
||||
|
||||
#define BATEBAN 2
|
||||
#define FIRSTPOSITIONMAXINDEX 1
|
||||
#define ELDERINDEXSTART FIRSTPOSITIONMAXINDEX+BATEBAN+1
|
||||
|
||||
typedef struct tagLevelUpPattern
|
||||
{
|
||||
#if 1
|
||||
struct Exptbl{
|
||||
int origin;
|
||||
int multi;
|
||||
}exptbl[3];
|
||||
int hpupminpoint; /* hp 及丐互月 斓袄*/
|
||||
int hpupmaxpoint; /* hp 及丐互月 斓袄*/
|
||||
|
||||
int needexp; /* 邰卅烦董袄 */
|
||||
#else
|
||||
int uppoint[5];
|
||||
#endif
|
||||
}LevelUpPattern;
|
||||
|
||||
/*====================赓渝袄}伊皮伙失永皿楮溢====================*/
|
||||
BOOL CHAR_getDefaultChar( Char* nc, int imagenumber );
|
||||
|
||||
/*====================隶 } 飓 寞赘尹楮溢====================*/
|
||||
int CHAR_getNewImagenumberFromEquip( int basebaseimagenumber,
|
||||
ITEM_CATEGORY category );
|
||||
/*==================== 飓 寞 侬 -> 寞楮溢====================*/
|
||||
//void CHAR_initSeekGraphicNumberFromString();
|
||||
int CHAR_seekGraphicNumberFromString( char* string );
|
||||
|
||||
|
||||
|
||||
/*====================平乓仿及赓渝袄楮溢====================*/
|
||||
BOOL CHAR_getInitElderPosition( Char* ch,int hometown);
|
||||
BOOL CHAR_getElderPosition( int elderindex, int* fl, int* x, int* y );
|
||||
|
||||
void CHAR_setInitValues( Char* ch );
|
||||
|
||||
|
||||
/*==================== 衬匏 楮溢====================*/
|
||||
typedef enum
|
||||
{
|
||||
CHAR_INVAREA,
|
||||
CHAR_CANNOTDROPAREA,
|
||||
CHAR_CANNOTMAGICAREA,
|
||||
CHAR_AREAKIND_NONE,
|
||||
}CHAR_AREAKIND;
|
||||
|
||||
BOOL CHAR_initInvinciblePlace( char* filename );
|
||||
BOOL CHAR_isCannotMagicArea( int floor , int x, int y, int magicnum );
|
||||
BOOL CHAR_initAppearPosition( char* filename );
|
||||
BOOL CHAR_isInvincibleArea( int floor , int x, int y );
|
||||
BOOL CHAR_isAppearPosition( int floor, int *x, int *y);
|
||||
BOOL CHAR_isCannotDropArea( int floor , int x, int y );
|
||||
|
||||
|
||||
/* 赢 楮溢 */
|
||||
BOOL CHAR_ElderSetPosition( int elderindex ,int fl,int x ,int y);
|
||||
|
||||
|
||||
|
||||
/*************************************************
|
||||
酵烂伊矛伙失永皿质
|
||||
*************************************************/
|
||||
|
||||
|
||||
int GetEnemyExp( int level );
|
||||
|
||||
int CHAR_GetLevel();
|
||||
int CHAR_GetLevelExp( int charaindex, int level );
|
||||
int CHAR_GetOldLevelExp( int level);
|
||||
|
||||
int CHAR_LevelUpCheck( int charaindex , int toindex);
|
||||
|
||||
int CHAR_PetLevelUp( int petindex );
|
||||
#define CHAR_PetLevelUpExInfc(petindex, lv) CHAR_PetLevelUp(petindex );
|
||||
|
||||
BOOL CHAR_checkFaceImageNumber( int imagenumber, int faceimagenumber);
|
||||
BOOL CHAR_checkPlayerImageNumber( int imagenumber);
|
||||
|
||||
int CHAR_PetTakeLevelUp( int petindex, int lv); //强制宠物升级
|
||||
int CHAR_PetTakeDrop( int petindex, int floor, int ox, int oy); //强制丢弃宠物升级
|
||||
|
||||
#ifdef _NPC_FUSION
|
||||
int PETFUSION_FusionPetSub( int charaindex, int Subindex1, int Subindex2, int *work, int *skill);
|
||||
BOOL PETFUSION_FusionPetMain( int charaindex, int Mainindex, int *work, int *skill);
|
||||
BOOL PETFUSION_DelPet( int toindex, int Mainindex, int Subindex1, int Subindex2, int flg);
|
||||
int PETFUSION_Evolution( int charaindex, int petindex);
|
||||
#endif
|
||||
int PETTRANS_PetTransManStatus( int toindex, int petindex1, int petindex2);
|
||||
#ifdef _PET_2TRANS
|
||||
int NPC_PetTransManGetAns( int total1, int total2, int LV, int rank, int tran);
|
||||
#else
|
||||
int NPC_PetTransManGetAns( int total1, int total2, int LV, int rank);
|
||||
#endif //_PET_2TRANS
|
||||
|
||||
#ifdef _CHIKULA_STONE
|
||||
void CHAR_AutoChikulaStone( int charaindex, int Dflg);
|
||||
#endif
|
||||
|
||||
#ifdef _STATUS_WATERWORD //水世界状态
|
||||
void CHAR_CheckWaterStatus( int charaindex);
|
||||
#endif
|
||||
|
||||
int CHAR_findSurplusPetBox( int charaindex );
|
||||
|
||||
#ifdef _USER_EXP_CF
|
||||
void setNeedLevelUpTbls(int level,int exp);
|
||||
void setMaxLevel(int level);
|
||||
#endif
|
||||
#ifdef _FM_METAMO
|
||||
void CHAR_ReMetamo( int charaindex );
|
||||
#endif
|
||||
#ifdef _NEW_PLAYER_RIDE
|
||||
void CHAR_PlayerRide( int charaindex );
|
||||
#endif
|
||||
#endif
|
31
include/char_event.h
Normal file
31
include/char_event.h
Normal file
@ -0,0 +1,31 @@
|
||||
#ifndef __CHAR_EVENT_H__
|
||||
#define __CHAR_EVENT_H__
|
||||
|
||||
#include "char_base.h"
|
||||
|
||||
void CHAR_allpostwalk( int index );
|
||||
BOOL CHAR_allprewalk( int index,int* dir,int* mode);
|
||||
|
||||
void CHAR_recoveryStatus( int charaindex );
|
||||
void CHAR_loopFunc( int index );
|
||||
void CHAR_playerWatchfunc( int meindex, int moveindex, CHAR_ACTION act,
|
||||
int x, int y, int dir, int* opt, int optlen );
|
||||
|
||||
void CHAR_sendWallDamage( int charaindex,int x, int y, int damage );
|
||||
void CHAR_playerresurrect( int charaindex, int hp );
|
||||
|
||||
int CHAR_die( int charaindex );
|
||||
void CHAR_playerTalkedfunc( int charaindex, int talkindex,char* message,
|
||||
int color, int channel );
|
||||
|
||||
void CHAR_recoveryStatus( int charaindex );
|
||||
BOOL CHAR_makeCADefaultString( int objindex,char* buf,int buflen, int act );
|
||||
BOOL CHAR_makeCAOPT1String( int objindex,char* buf,
|
||||
int buflen, int act,int opt1 );
|
||||
BOOL CHAR_makeCAOPT3String( int objindex,char* buf,
|
||||
int buflen, int act,int opt1,int opt2,int opt3 );
|
||||
#ifdef _STREET_VENDOR
|
||||
BOOL CHAR_makeCAOPTString(int objindex,char* buf,int buflen,int act,char *string);
|
||||
#endif
|
||||
|
||||
#endif
|
41
include/char_talk.h
Normal file
41
include/char_talk.h
Normal file
@ -0,0 +1,41 @@
|
||||
#ifndef __CHAR_TALK_H__
|
||||
#define __CHAR_TALK_H__
|
||||
|
||||
#include "common.h"
|
||||
#include "util.h"
|
||||
#include "net.h"
|
||||
#ifdef _ALLBLUES_LUA
|
||||
#include "lua.h"
|
||||
#include "lauxlib.h"
|
||||
#include "lualib.h"
|
||||
#endif
|
||||
void CHAR_getMessageBody(char* message, char* kind, int kindlen,
|
||||
char** body);
|
||||
|
||||
int CHAR_getChatMagicFuncLevel(char* name,BOOL isDebug);
|
||||
int CHAR_getChatMagicFuncNameAndString( int ti, char* name, char *usestring, int level, BOOL isDebug);
|
||||
int CHAR_getChatMagicFuncMaxNum( void);
|
||||
|
||||
void OneByOneTkChannel ( int fd , char *tmp1 , char *tmp2 , int color) ;
|
||||
|
||||
#ifdef _ALLBLUES_LUA_1_2
|
||||
typedef struct tagMAGIC_LuaFunc
|
||||
{
|
||||
lua_State *lua;
|
||||
char *luafuncname;
|
||||
char *luafunctable;
|
||||
int gmlevel;
|
||||
char *usestring;
|
||||
struct tagMAGIC_LuaFunc *next;
|
||||
}MAGIC_LuaFunc;
|
||||
|
||||
BOOL MAGIC_addLUAListFunction( lua_State *L, const char *luafuncname, const char *luafunctable, int gmlevel, char *usestring );
|
||||
BOOL MAGIC_getLUAListFunction( char *luafuncname, int gmlevel, int charaindex, char *data );
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _RE_GM_COMMAND
|
||||
int re_gm_command();
|
||||
#endif
|
||||
|
||||
#endif
|
295
include/chatmagic.h
Normal file
295
include/chatmagic.h
Normal file
@ -0,0 +1,295 @@
|
||||
#ifndef __CHATMAGIC_H__
|
||||
#define __CHATMAGIC_H__
|
||||
#include "version.h"
|
||||
|
||||
void CHAR_CHAT_DEBUG_hp( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_mp( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_setmp( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_str( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_dex( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_tgh( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_vital( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_luck( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_gold( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_additem( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_metamo( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_warp( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_info( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_sysinfo( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_announce(int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_level( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_delitem( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_superman( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_battlein( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_battleout( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_petmake( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_enemyrestart( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_s_gb( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_s_gu( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_s_tame( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_fieldatt( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_s_ren( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_s_geki( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_s_hai( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_j_state( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_battlewatch( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_eventclean( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_eventsetend( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_eventsetnow( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_debug( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_exp( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_dp( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_setTrans( int charaindex, char *message);
|
||||
void CHAR_CHAT_DEBUG_getuser(int charindex ,char *message);//ttom +1 14/11/2000
|
||||
void CHAR_CHAT_DEBUG_shutup(int charindex ,char *message);//ttom 22/11/2000
|
||||
void CHAR_CHAT_DEBUG_waeikick( int charindex, char* message );//ttom 12/02/2000
|
||||
void CHAR_CHAT_DEBUG_effect( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_jail( int charindex, char* message );//ttom 01/11/2001
|
||||
void CHAR_CHAT_DEBUG_shutupall(int charindex ,char *message);//ttom 02/01/2001
|
||||
void CHAR_CHAT_DEBUG_send(int charindex ,char *message);//ttom 02/01/2001
|
||||
void CHAR_CHAT_DEBUG_noenemy(int charaindex, char *message);
|
||||
void CHAR_CHAT_DEBUG_loginannounce(int charaindex, char* message); // Arminius 7.12 login announce
|
||||
void CHAR_CHAT_DEBUG_deletepet(int charaindex, char* message); // Robin 0720
|
||||
void CHAR_CHAT_DEBUG_deleteitem(int charaindex, char* message); // Robin 0720
|
||||
void CHAR_CHAT_DEBUG_checklock(int charaindex, char* message); // Arminius 7.25
|
||||
void CHAR_CHAT_DEBUG_unlock(int charaindex, char* message);
|
||||
void CHAR_CHAT_DEBUG_unlockserver(int charaindex, char* message);
|
||||
void CHAR_CHAT_DEBUG_fixfmdata(int charaindex, char* message); // CoolFish: GM Family 2001/7/31
|
||||
void CHAR_CHAT_DEBUG_shutdown(int charaindex, char* message); // Robin 1008
|
||||
void CHAR_CHAT_DEBUG_manorpk(int charaindex, char *message);
|
||||
|
||||
void CHAR_CHAT_DEBUG_watchevent( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_fixfmpk(int charaindex, char *message);
|
||||
void CHAR_CHAT_DEBUG_reloadmsip( int charaindex, char *message);
|
||||
void CHAR_CHAT_DEBUG_cleanfreepet(int charaindex, char *message);
|
||||
void CHAR_CHAT_DEBUG_engineer( int charindex, char *message);
|
||||
void CHAR_CHAT_DEBUG_waeikickall( int charindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_showMem(int charaindex, char *message);
|
||||
void CHAR_CHAT_DEBUG_playerspread( int charaindex, char *message);
|
||||
void CHAR_CHAT_DEBUG_reset( int charaindex, char* message );
|
||||
|
||||
void CHAR_CHAT_DEBUG_laba(int charindex , char *message ); //紫云 小喇叭
|
||||
void CHAR_CHAT_DEBUG_dalaba(int charindex , char *message ); //紫云 大喇叭
|
||||
|
||||
#ifdef _MAKE_MAP
|
||||
void CHAR_CHAT_DelMap( int charaindex, char* message );
|
||||
void CHAR_CHAT_GetMap( int charaindex, char* message );
|
||||
void CHAR_CHAT_Map( int charaindex, char* message );
|
||||
void CHAR_CHAT_Fixtile( int charaindex, char* message );
|
||||
void CHAR_CHAT_Fixobj( int charaindex, char* message );
|
||||
void CHAR_CHAT_Fukuwa( int charaindex, char* message );
|
||||
#endif
|
||||
|
||||
#ifdef _GMRELOAD
|
||||
void CHAR_CHAT_DEBUG_gmreload(int charaindex, char *message);
|
||||
#endif
|
||||
#ifdef _CHAR_PROFESSION // WON ADD 人物职业
|
||||
void CHAR_CHAT_DEBUG_addsk( int charaindex, char *message );
|
||||
void CHAR_CHAT_DEBUG_delsk( int charaindex, char *message );
|
||||
#endif
|
||||
void CHAR_CHAT_DEBUG_cleanfloor( int charaindex, char *message);
|
||||
|
||||
#ifdef _GAMBLE_BANK
|
||||
void CHAR_CHAT_DEBUG_setgamblenum( int charaindex, char *message );
|
||||
#endif
|
||||
#ifdef _WAEI_KICK
|
||||
void CHAR_CHAT_DEBUG_gmkick( int charindex, char* message);
|
||||
#endif
|
||||
// WON ADD 修正族长问题
|
||||
void CHAR_CHAT_DEBUG_fixfmleader(int charaindex, char *message);
|
||||
|
||||
// WON ADD 当机指令
|
||||
void CHAR_CHAT_DEBUG_crash(int charaindex, char *message);
|
||||
void CHAR_CHAT_DEBUG_SAVESHH( int fd, int charaindex,char* message,int color, int area );
|
||||
#ifdef _PETSKILL_SETDUCK
|
||||
void CHAR_CHAT_DEBUG_SetDuck( int charaindex, char *message);
|
||||
#endif
|
||||
#ifdef _TYPE_TOXICATION
|
||||
void CHAR_CHAT_DEBUG_Toxication( int charaindex, char *message);
|
||||
#endif
|
||||
|
||||
#ifdef _SEND_EFFECT // WON ADD AC送下雪、下雨等特效
|
||||
void CHAR_CHAT_DEBUG_sendeffect(int charaindex, char *message);
|
||||
#endif
|
||||
#ifdef _TEST_DROPITEMS
|
||||
void CHAR_CHAT_DEBUG_dropmypet( int charindex, char *message );
|
||||
void CHAR_CHAT_DEBUG_dropmyitem( int charindex , char *message );
|
||||
#endif
|
||||
|
||||
#ifdef _CHAR_PROFESSION // WON ADD 人物职业
|
||||
void CHAR_CHAT_DEBUG_show_profession( int charaindex, char*message );
|
||||
void CHAR_CHAT_DEBUG_set_regist( int charaindex, char*message );
|
||||
#endif
|
||||
|
||||
void CHAR_CHAT_DEBUG_checktrade( int charaindex, char*message);
|
||||
|
||||
void CHAR_CHAT_DEBUG_checktime( int charaindex, char *message);
|
||||
void CHAR_CHAT_DEBUG_samecode( int charaindex, char *message);
|
||||
void CHAR_CHAT_DEBUG_silent(int charindex ,char *message);
|
||||
void CHAR_CHAT_DEBUG_help( int charindex, char *message);
|
||||
#ifdef _EQUIT_ARRANGE
|
||||
void CHAR_CHAT_DEBUG_arrange( int charindex , char *message );
|
||||
#endif
|
||||
|
||||
#ifdef _EQUIT_SEQUENCE
|
||||
void CHAR_CHAT_DEBUG_sequence( int charindex , char *message );
|
||||
#endif
|
||||
|
||||
#ifdef _EQUIT_NEGLECTGUARD
|
||||
void CHAR_CHAT_DEBUG_setneguard( int charaindex, char* message );
|
||||
#endif
|
||||
|
||||
void CHAR_CHAT_DEBUG_petlevelup( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_petexpup( int charaindex, char* message );
|
||||
|
||||
void CHAR_CHAT_DEBUG_reloadpkteamlist( int charaindex, char *message);
|
||||
void CHAR_CHAT_DEBUG_setBattle( int charaindex, char *message );
|
||||
|
||||
|
||||
#ifdef _CHAR_POOLITEM
|
||||
void CHAR_CHAT_DEBUG_saveditem(int charaindex, char *message);
|
||||
void CHAR_CHAT_DEBUG_insertditem(int charaindex, char *message);
|
||||
void CHAR_CHAT_DEBUG_ShowMyDepotItems( int charaindex, char *message );
|
||||
void CHAR_CHAT_DEBUG_InSideMyDepotItems( int charaindex, char *message );
|
||||
#endif
|
||||
|
||||
#ifdef _CHAR_POOLPET
|
||||
void CHAR_CHAT_DEBUG_savedpet(int charaindex, char *message);
|
||||
void CHAR_CHAT_DEBUG_insertdpet(int charaindex, char *message);
|
||||
void CHAR_CHAT_DEBUG_ShowMyDepotPets( int charaindex, char *message );
|
||||
void CHAR_CHAT_DEBUG_InSideMyDepotPets( int charaindex, char *message );
|
||||
#endif
|
||||
|
||||
#ifdef _NEW_MANOR_LAW
|
||||
void CHAR_CHAT_DEBUG_set_momentum( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_set_manor_owner( int charindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_set_schedule_time( int charindex, char* message );
|
||||
#endif
|
||||
|
||||
#ifdef _ANGEL_SUMMON
|
||||
void CHAR_CHAT_DEBUG_angelinfo(int charindex ,char *message);
|
||||
void CHAR_CHAT_DEBUG_angelclean(int charindex ,char *message);
|
||||
void CHAR_CHAT_DEBUG_angelcreate(int charindex ,char *message);
|
||||
void CHAR_CHAT_DEBUG_missionreload(int charindex ,char *message);
|
||||
#endif
|
||||
|
||||
void CHAR_CHAT_DEBUG_itemreload(int charindex ,char *message);
|
||||
|
||||
void CHAR_CHAT_DEBUG_skywalker(int charaindex ,char *message);
|
||||
|
||||
#ifdef _ITEM_ADDEXP
|
||||
void CHAR_CHAT_DEBUG_itemaddexp(int charaindex ,char *message);
|
||||
#endif
|
||||
|
||||
#ifdef _DEF_GETYOU
|
||||
void CHAR_CHAT_DEBUG_getyou(int charaindex,char *message);
|
||||
#endif
|
||||
|
||||
#ifdef _DEF_NEWSEND
|
||||
void CHAR_CHAT_DEBUG_newsend(int charindex ,char *message);
|
||||
#endif
|
||||
|
||||
#ifdef _DEF_SUPERSEND
|
||||
void CHAR_CHAT_DEBUG_supersend(int charindex ,char *message);
|
||||
#endif
|
||||
|
||||
#ifdef _FONT_SIZE
|
||||
void CHAR_CHAT_DEBUG_fsize(int charindex ,char *message);
|
||||
#endif
|
||||
|
||||
#ifdef _JOBDAILY
|
||||
void CHAR_CHAT_DEBUG_rejobdaily(int charindex ,char *message);
|
||||
#endif
|
||||
|
||||
#ifdef _CREATE_MM_1_2
|
||||
void CHAR_CHAT_DEBUG_MM(int charaindex , char *message );
|
||||
#endif
|
||||
|
||||
#ifdef _SendTo
|
||||
void CHAR_CHAT_DEBUG_Sendto( int charaindex , char *message );
|
||||
#endif
|
||||
|
||||
void CHAR_CHAT_printcount( int charaindex, char* message );
|
||||
|
||||
#ifdef _GM_ITEM
|
||||
void CHAR_CHAT_DEBUG_GMFUNCTION( int charindex , char *message );
|
||||
#endif
|
||||
|
||||
#ifdef _GM_RIDE
|
||||
void CHAR_CHAT_DEBUG_SETRIDE( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_MVRIDE( int charindex , char *message );
|
||||
#endif
|
||||
|
||||
#ifdef _LOCK_IP
|
||||
void CHAR_CHAT_DEBUG_ADD_LOCK( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_DEL_LOCK( int charindex , char *message );
|
||||
void CHAR_CHAT_DEBUG_SHOWIP( int charindex , char *message );
|
||||
#endif
|
||||
void CHAR_CHAT_DEBUG_SET_FAME( int charaindex, char* message );
|
||||
#ifdef _AUTO_PK
|
||||
void CHAR_CHAT_DEBUG_SET_AUTOPK( int charaindex, char* message );
|
||||
#endif
|
||||
|
||||
#ifdef _PLAYER_NUM
|
||||
void CHAR_CHAT_DEBUG_SET_PLAYERNUM( int charaindex, char* message );
|
||||
#endif
|
||||
#ifdef _RELOAD_CF
|
||||
void CHAR_CHAT_DEBUG_SET_RELOADCF( int charaindex, char* message );
|
||||
#endif
|
||||
#ifdef _TRANS
|
||||
void CHAR_CHAT_DEBUG_Trans( int charaindex, char *message);
|
||||
#endif
|
||||
#ifdef _FUSIONBEIT_FIX
|
||||
void CHAR_CHAT_DEBUG_fusionbeit( int charaindex, char* message );
|
||||
#endif
|
||||
#ifdef _MAKE_PET_CF
|
||||
void CHAR_CHAT_DEBUG_petmakecf( int charaindex, char* message );
|
||||
#endif
|
||||
#ifdef _MAKE_PET_ABILITY
|
||||
void CHAR_CHAT_DEBUG_petmakeabi( int charaindex, char* message );
|
||||
#endif
|
||||
void CHAR_CHAT_DEBUG_zynetwork( int charaindex, char* message );
|
||||
#ifdef _ALL_ITEM
|
||||
void CHAR_CHAT_DEBUG_setallnum( int charaindex, char* message );
|
||||
#endif
|
||||
#ifdef _JZ_NEWSCRIPT_LUA
|
||||
void CHAR_CHAT_DEBUG_LUA_INIT( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_LUA_CLOSE( int charaindex, char* message );
|
||||
#endif
|
||||
#ifdef _UNTEXT_TALK
|
||||
void CHAR_CHAT_UnTextReload( int charaindex, char* message );
|
||||
#endif
|
||||
void CHAR_CHAT_FengHao( int charaindex, char* message );
|
||||
#ifdef _NO_FULLPLAYER_ATT
|
||||
void CHAR_CHAT_NoFullPlayer( int charaindex, char* message );
|
||||
#endif
|
||||
void CHAR_CHAT_DelFm( int charaindex, char* message );
|
||||
void CHAR_CHAT_ExpBase( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_jilu( int charindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_setfmpk( int charindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_MMCDKEY( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_RELOADRIDE( int charaindex, char* message );
|
||||
#ifdef _ALLBLUES_LUA
|
||||
void CHAR_CHAT_DEBUG_ReLoadLua( int charaindex, char* message );
|
||||
void CHAR_CHAT_DEBUG_NewLoadLua( int charaindex, char* message );
|
||||
#endif
|
||||
#ifdef _CARD_PRODUCTION
|
||||
void CHAR_CHAT_DEBUG_card(int charindex ,char *message);
|
||||
#endif
|
||||
|
||||
#ifdef _CAX_GM_RERIDE
|
||||
void CHAR_CHAT_DEBUG_reride(int charindex ,char *message);
|
||||
#endif
|
||||
#ifdef _CAX_GM_RESKILLCODE
|
||||
void CHAR_CHAT_DEBUG_reskillcode(int charindex ,char *message);
|
||||
#endif
|
||||
#ifdef _CAX_GM_RELEADERRIDE
|
||||
void CHAR_CHAT_DEBUG_releaderride(int charindex ,char *message);
|
||||
#endif
|
||||
#ifdef _GM_SAVE_ALL_CHAR
|
||||
void CHAR_CHAT_DEBUG_GmSaveAllChar( int charaindex, char* message );
|
||||
#endif
|
||||
#ifdef _FIX_TRADE_COPYPET
|
||||
void CHAR_CHAT_DEBUG_CLEANCOPYPET( int charaindex, char* message );
|
||||
#endif
|
||||
#endif
|
22
include/chatroom.h
Normal file
22
include/chatroom.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef __CHATROOM_H__
|
||||
#define __CHATROOM_H__
|
||||
#include "version.h"
|
||||
|
||||
#define MAX_CHATROOM 10
|
||||
#define MAX_PPLINROOM 100
|
||||
|
||||
void InitChatRoom ( void ) ;
|
||||
void ChatRoom_List ( int fd );
|
||||
BOOL ChatCheck_BeMaster( int myindex, int chatnum);
|
||||
BOOL ChatCheck_Free( int myindex);
|
||||
BOOL ChatRoom_Create ( int myindex , char *message);
|
||||
BOOL ChatRoom_Destroy ( int myindex ) ;
|
||||
void ChatRoom_Kick ( int myindex , int toindex ) ;
|
||||
void ChatRoom_Make ( int myindex , int toindex ) ;
|
||||
void ChatRoom_Leave ( int myindex ) ;
|
||||
void ChatRoom_Join ( int myindex , int num ) ;
|
||||
void ChatRoom_Agree ( int myindex , int toindex , int YesNo ) ;
|
||||
void ChatRoom_Message ( int myindex , char *message ) ;
|
||||
void ChatRoom_Refresh ( int Num ) ;
|
||||
void ChatRoom_recvall ( int fd , char *data ) ;
|
||||
#endif
|
60
include/common.h
Normal file
60
include/common.h
Normal file
@ -0,0 +1,60 @@
|
||||
#ifndef __COMMON_H__
|
||||
#define __COMMON_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* MACROS */
|
||||
#define RETURNFALSEIFFALSE(x) if(!x)return FALSE;
|
||||
#define EXITWITHEXITCODEIFFALSE(x,code) if(!x)exit(code);
|
||||
#ifdef __GNUC__
|
||||
#define print(format,arg...) fprintf( stderr, format ,##arg)
|
||||
#define fprint(format,arg...) fprintf( stderr, "%s:%d " format , __FILE__ , __LINE__ , ##arg)
|
||||
#endif
|
||||
#define debug(x,y) fprintf( stderr, #x " = %" #y "\n" , x)
|
||||
#define arraysizeof( x ) (sizeof(x)/sizeof(x[0]))
|
||||
|
||||
#define errorprint {extern int errno;fprint( "%s\n" ,strerror(errno));}
|
||||
|
||||
#define BACKSLASH '\\'
|
||||
#define NEWLINE '\n'
|
||||
#define TAB '\t'
|
||||
#define SPACE ' '
|
||||
|
||||
/*票及 define 方曰兜蝈卞允月 */
|
||||
/*#define min( x,y ) ((x)>(y)?(y):(x))
|
||||
#define max( x,y ) ((x)>(y)?(x):(y))*/
|
||||
#define min( x,y ) ({typeof(x) __x=(x),__y=(y);(__x < __y) ? __x : __y; })
|
||||
#define max( x,y ) ({typeof(x) __x=(x),__y=(y);(__x < __y) ? __y : __x; })
|
||||
#define swap( x,y )({typeof(x) __x=(y);(y)=(x);(x)=__x;})
|
||||
#define SUCCESSFUL "successful"
|
||||
#define FAILED "failed"
|
||||
|
||||
#define LOCK 1
|
||||
#define UNLOCK 0
|
||||
|
||||
#define STRINGBUFSIZ 4096
|
||||
|
||||
#define OPEN {FILE* f;f=fopen("a.txt","a");
|
||||
#define CLOSE fclose(f);}
|
||||
|
||||
#define time_diff_us(new,old) ((unsigned)( (new.tv_sec - old.tv_sec)*1000000 + ( new.tv_usec - old.tv_usec ) ))
|
||||
|
||||
|
||||
|
||||
|
||||
extern int snprintf (char* , size_t, const char* , ...)
|
||||
#ifdef __GNUC__
|
||||
__attribute__ ((format (printf,3,4)));
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
#define ON 1
|
||||
#define OFF 0
|
||||
#define BOOL int
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
#define INLINE inline
|
||||
|
||||
#endif
|
715
include/configfile.h
Normal file
715
include/configfile.h
Normal file
@ -0,0 +1,715 @@
|
||||
#ifndef __CONFIGFILE_H__
|
||||
#define __CONFIGFILE_H__
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __CONFIGFILE_C__
|
||||
#define EXTERN
|
||||
#else /* __CONFIGFILE_C__ */
|
||||
#define EXTERN extern
|
||||
#endif /* __CONFIGFILE_C__ */
|
||||
|
||||
// Arminius 7.12 login announce
|
||||
extern char announcetext[8192];
|
||||
void AnnounceToPlayer(int charaindex);
|
||||
// Robin 0720
|
||||
void AnnounceToPlayerWN(int fd);
|
||||
void LoadAnnounce(void);
|
||||
|
||||
#ifdef _PET_TALKPRO
|
||||
#define PETTALK_MAXID 10 //增加pettalk数量到10
|
||||
typedef struct {
|
||||
int ID;
|
||||
char DATA[1024*64]; //1M
|
||||
}PTALK;
|
||||
extern PTALK pettalktext[PETTALK_MAXID];
|
||||
void LoadPetTalk(void);
|
||||
#else
|
||||
|
||||
extern char pettalktext[4096];
|
||||
void LoadPetTalk(void);
|
||||
#endif
|
||||
|
||||
#ifdef _GAMBLE_BANK
|
||||
#define GAMBLEBANK_ITEMSMAX 100
|
||||
#define DEFEND_ITEMSMAX 40
|
||||
typedef struct REGAMBLEBANKITEMS {
|
||||
char name[128];
|
||||
int Gnum;
|
||||
int ItemId;
|
||||
int type;
|
||||
}GAMBLEBANK_ITEMS;
|
||||
|
||||
extern GAMBLEBANK_ITEMS GB_ITEMS[GAMBLEBANK_ITEMSMAX];
|
||||
|
||||
void Load_GambleBankItems( void);
|
||||
#endif
|
||||
|
||||
#ifdef _CFREE_petskill
|
||||
#define PETSKILL_CODE 500
|
||||
typedef struct REPETSKILL_CODES {
|
||||
char name[128];
|
||||
int TempNo;
|
||||
int PetId;
|
||||
char Code[256];
|
||||
}PETSKILL_CODES;
|
||||
|
||||
extern PETSKILL_CODES Code_skill[PETSKILL_CODE];
|
||||
void Load_PetSkillCodes( void);
|
||||
#endif
|
||||
|
||||
#ifdef _GMRELOAD
|
||||
#define GMMAXNUM 100
|
||||
struct GMINFO
|
||||
{
|
||||
char cdkey[24];
|
||||
int level;
|
||||
};
|
||||
extern struct GMINFO gminfo[GMMAXNUM];
|
||||
#endif
|
||||
|
||||
BOOL readconfigfile( char* filename );
|
||||
|
||||
void defaultConfig( char* argv0 );
|
||||
char* getProgname( void );
|
||||
char* getConfigfilename( void );
|
||||
void setConfigfilename( char* newv );
|
||||
|
||||
unsigned int getDebuglevel( void );
|
||||
unsigned int setDebuglevel( unsigned int newv );
|
||||
unsigned int getMemoryunit( void );
|
||||
unsigned int getMemoryunitnum( void );
|
||||
char* getAccountservername( void );
|
||||
unsigned short getAccountserverport( void );
|
||||
char* getAccountserverpasswd( void );
|
||||
char* getGameservername( void );
|
||||
unsigned short getPortnumber( void );
|
||||
|
||||
int getServernumber( void );
|
||||
int getReuseaddr( void );
|
||||
int getNodelay( void );
|
||||
int getLogWriteTime(void);
|
||||
int getLogIOTime( void);
|
||||
int getLogGameTime(void);
|
||||
int getLogNetloopFaster(void);
|
||||
int getSaacwritenum( void );
|
||||
void setSaacwritenum( int num );
|
||||
int getSaacreadnum( void );
|
||||
void setSaacreadnum( int num );
|
||||
|
||||
unsigned int getFdnum( void );
|
||||
unsigned int setFdnum(int temp_fdnum);
|
||||
unsigned int getPlayercharnum( void );
|
||||
unsigned int getPetcharnum( void );
|
||||
unsigned int getOtherscharnum( void );
|
||||
unsigned int getObjnum( void );
|
||||
unsigned int getItemnum( void );
|
||||
unsigned int getBattlenum( void );
|
||||
|
||||
char* getTopdir( void );
|
||||
char* getMapdir( void );
|
||||
char* getMaptilefile( void );
|
||||
char* getBattleMapfile( void );
|
||||
char* getItemfile( void );
|
||||
char* getInvfile( void );
|
||||
char* getAppearfile( void );
|
||||
char* getEffectfile( void );
|
||||
char* getTitleNamefile( void );
|
||||
char* getTitleConfigfile( void );
|
||||
char* getLsgenlogfilename( void );
|
||||
char* getStoredir( void );
|
||||
#ifdef _STORECHAR
|
||||
char* getStorechar( void );
|
||||
#endif
|
||||
char* getNpcdir( void );
|
||||
char* getLogdir( void );
|
||||
char* getLogconffile( void );
|
||||
char* getChatMagicPasswd( void );
|
||||
unsigned int getChatMagicCDKeyCheck( void );
|
||||
|
||||
|
||||
unsigned int getFilesearchnum( void );
|
||||
unsigned int getNpctemplatenum( void );
|
||||
unsigned int getNpccreatenum( void );
|
||||
unsigned int getWalksendinterval( void );
|
||||
void setWalksendinterval( unsigned int );
|
||||
unsigned int getCAsendinterval_ms( void );
|
||||
void setCAsendinterval_ms( unsigned int );
|
||||
unsigned int getCDsendinterval_ms( void );
|
||||
void setCDsendinterval_ms( unsigned int );
|
||||
unsigned int getOnelooptime_ms( void );
|
||||
void setOnelooptime_ms( unsigned int );
|
||||
unsigned int getCharSavesendinterval( void );
|
||||
void setCharSavesendinterval( unsigned int interval);
|
||||
unsigned int getAddressbookoffmsgnum( void );
|
||||
unsigned int getProtocolreadfrequency( void );
|
||||
unsigned int getAllowerrornum( void );
|
||||
unsigned int getFengerrornum( void );
|
||||
unsigned int getLogHour( void );
|
||||
unsigned int getBattleDebugMsg( void );
|
||||
void setBattleDebugMsg( unsigned int );
|
||||
|
||||
char* getEncountfile( void );
|
||||
char* getEnemyfile( void );
|
||||
char* getGroupfile( void );
|
||||
char* getEnemyBasefile( void );
|
||||
char* getMagicfile( void );
|
||||
#ifdef _ATTACK_MAGIC
|
||||
|
||||
char* getAttMagicfileName( void );
|
||||
|
||||
#endif
|
||||
|
||||
char* getPetskillfile( void );
|
||||
char *getItematomfile( void );
|
||||
char *getQuizfile( void );
|
||||
|
||||
#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能
|
||||
char* getProfession( void );
|
||||
#endif
|
||||
|
||||
unsigned int getPetdeletetime( void );
|
||||
void setPetdeletetime( unsigned int interval );
|
||||
|
||||
unsigned int getItemdeletetime( void );
|
||||
void setItemdeletetime( unsigned int interval );
|
||||
//ttom add this because the second have this function
|
||||
//unsigned int getAcwriteSize( void );
|
||||
|
||||
#ifdef _DEL_DROP_GOLD
|
||||
unsigned int getGolddeletetime( void );
|
||||
void setGolddeletetime( unsigned int interval );
|
||||
#endif
|
||||
|
||||
unsigned int setEncodeKey( void );
|
||||
unsigned int setAcWBSize( void );
|
||||
//ttom end
|
||||
|
||||
// CoolFish: +2 2001/4/18
|
||||
unsigned int getAcwriteSize( void );
|
||||
unsigned int getErrUserDownFlg( void );
|
||||
|
||||
// Arminius 7.24 manor pk
|
||||
char* getGameserverID( void );
|
||||
unsigned short getAllowManorPK( void );
|
||||
|
||||
// Terry 2001/10/03 service ap
|
||||
char* getApID(void);
|
||||
unsigned short getApPort(void);
|
||||
int getLoopTime(void);
|
||||
int getEnableService(void);
|
||||
|
||||
#ifdef _GMRELOAD
|
||||
char* getGMSetfile(void);
|
||||
BOOL LoadGMSet(char *filename);
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_QUITPARTY
|
||||
char* getitemquitparty( void );
|
||||
#endif
|
||||
|
||||
#ifdef _NEW_PLAYER_CF
|
||||
int getNewplayertrans( void );
|
||||
int getNewplayerlv( void );
|
||||
int getNewplayergivepet( unsigned int index );
|
||||
void setNewplayergivepet( unsigned int index ,unsigned int interval);
|
||||
int getNewplayerpetlv( void );
|
||||
int getNewplayergivegold( void );
|
||||
int getRidePetLevel( void );
|
||||
#ifdef _VIP_SERVER
|
||||
int getNewplayergivevip( void );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _USER_EXP_CF
|
||||
BOOL LoadEXP( char* filename );
|
||||
char* getEXPfile( void );
|
||||
int getNeedLevelUpTbls( int level );
|
||||
#endif
|
||||
|
||||
#ifdef _UNREG_NEMA
|
||||
char* getUnregname( int index );
|
||||
#endif
|
||||
|
||||
#ifdef _TRANS_LEVEL_CF
|
||||
int getChartrans( void );
|
||||
int getPettrans( void );
|
||||
int getYBLevel( void );
|
||||
int getMaxLevel( void );
|
||||
#endif
|
||||
|
||||
#ifdef _POINT
|
||||
char* getPoint( void );
|
||||
int getTransPoint( int index );
|
||||
#endif
|
||||
|
||||
#ifdef _PET_UP
|
||||
int getPetup( void );
|
||||
#endif
|
||||
#ifdef _WATCH_FLOOR
|
||||
int getWatchFloor( unsigned int index );
|
||||
char* getWatchFloorCF( void );
|
||||
#endif
|
||||
|
||||
#ifdef _BATTLE_FLOOR
|
||||
int getBattleFloor( unsigned int index );
|
||||
char* getBattleFloorCF( void );
|
||||
#endif
|
||||
|
||||
#ifdef _LOOP_ANNOUNCE
|
||||
char* getLoopAnnouncePath( void );
|
||||
int loadLoopAnnounce( void );
|
||||
int getLoopAnnounceTime( void );
|
||||
char* getLoopAnnounce( int index );
|
||||
int getLoopAnnounceMax( void );
|
||||
#endif
|
||||
|
||||
#ifdef _SKILLUPPOINT_CF
|
||||
int getSkup( void );
|
||||
#endif
|
||||
#ifdef _RIDELEVEL
|
||||
int getRideLevel( void );
|
||||
#endif
|
||||
#ifdef _REVLEVEL
|
||||
char* getRevLevel( void );
|
||||
#endif
|
||||
#ifdef _NEW_PLAYER_RIDE
|
||||
char* getPlayerRide( void );
|
||||
#endif
|
||||
#ifdef _FIX_CHARLOOPS
|
||||
int getCharloops( void );
|
||||
#endif
|
||||
#ifdef _PLAYER_ANNOUNCE
|
||||
int getPAnnounce( void );
|
||||
#endif
|
||||
#ifdef _PLAYER_MOVE
|
||||
int getPMove( void );
|
||||
#endif
|
||||
|
||||
int getrecvbuffer( void );
|
||||
int getsendbuffer( void );
|
||||
int getrecvlowatbuffer( void );
|
||||
int getrunlevel( void );
|
||||
|
||||
#ifdef _SHOW_VIP_CF
|
||||
int getShowVip( void );
|
||||
#endif
|
||||
|
||||
#ifdef _PLAYER_NUM
|
||||
int getPlayerNum( void );
|
||||
void setPlayerNum( int num );
|
||||
char* getPlayerBase( void );
|
||||
#endif
|
||||
#ifdef _BATTLE_GOLD
|
||||
int getBattleGold( void );
|
||||
#endif
|
||||
|
||||
#ifdef _ANGEL_TIME
|
||||
int getAngelPlayerTime( void );
|
||||
int getAngelPlayerMun( void );
|
||||
#endif
|
||||
|
||||
#ifdef _RIDEMODE_20
|
||||
int getRideMode( void );
|
||||
#endif
|
||||
|
||||
#ifdef _FM_POINT_PK
|
||||
char *getFmPointPK( void );
|
||||
#endif
|
||||
|
||||
#ifdef _ENEMY_ACTION
|
||||
int getEnemyAction( void );
|
||||
#endif
|
||||
|
||||
#ifdef _FUSIONBEIT_TRANS
|
||||
int getFusionbeitTrans( void );
|
||||
#endif
|
||||
|
||||
char *getMacCheck( void );
|
||||
int getCpuUse( void );
|
||||
|
||||
#ifdef _CHECK_PEPEAT
|
||||
int getCheckRepeat( void );
|
||||
#endif
|
||||
|
||||
#ifdef _VIP_ALL
|
||||
int getCheckVip( void );
|
||||
#endif
|
||||
#ifdef _FM_JOINLIMIT
|
||||
int getJoinFamilyTime( void );
|
||||
#endif
|
||||
|
||||
#ifdef _NOWEN_EV
|
||||
int getNowEvent(int Num);
|
||||
int getEndEvent(int Num);
|
||||
#endif
|
||||
|
||||
#ifdef _JK_CF_DELPETITEM //删除CF指定物品和宠物
|
||||
char *getDelPet(void);
|
||||
char *getDelItem(void);
|
||||
#endif
|
||||
int getBalltePoint(int Num);
|
||||
#ifdef _ALL_TALK
|
||||
int getTheWorldTrans( void );
|
||||
int getTheWorldFame( void );
|
||||
int getTheWorldTime( void );
|
||||
int getTheWorldCnt( void );
|
||||
#endif
|
||||
#ifdef _DIY_INSLAY
|
||||
int getInslayNum(void);
|
||||
#endif
|
||||
int getSafeMode(void);
|
||||
int getTradeTax(void);
|
||||
#ifdef _MAP_HEAL
|
||||
int getMapHeal(int Num);
|
||||
#endif
|
||||
#ifdef _VIP_RIDE
|
||||
int getVipMsgType(void);
|
||||
#endif
|
||||
#ifdef _VIP_BATTLE_EXP
|
||||
int getVipBattleExp( void );
|
||||
#endif
|
||||
int getItemPoolBug(void);
|
||||
int getSameIpLogin(void);
|
||||
int getPetRideTrans(void);
|
||||
#ifdef _LUCK_MAN
|
||||
int getLuckTime( void );
|
||||
int getLuckItem( void );
|
||||
#endif
|
||||
#ifdef _QUESTION_ONLINE
|
||||
int getQustionTime( void );
|
||||
int getQuestionItem( int num );
|
||||
#endif
|
||||
#ifdef _NO_STREET_MAP
|
||||
int getNoStreetMap( int num );
|
||||
#endif
|
||||
#ifdef _STREET_FAX
|
||||
int getStreetFax( int num );
|
||||
#endif
|
||||
int getFmWarTime( int num );
|
||||
#endif
|
||||
#ifdef _JZ_NEWSCRIPT_LUA
|
||||
char *getLuaFile(void);
|
||||
#endif
|
||||
#ifdef _TRANS7_POINT
|
||||
int getTrans7Point(void);
|
||||
#endif
|
||||
#ifdef _NOJOB_PK
|
||||
int getNoJobPkMap(void);
|
||||
#endif
|
||||
#ifdef _UNTEXT_TALK
|
||||
char *getUnText(int num);
|
||||
#endif
|
||||
BOOL LoadStreetItemUnText( void );
|
||||
char *getStreetItemUnName(int num);
|
||||
#ifdef _NO_ATTACK
|
||||
int getAttTime(void);
|
||||
int getAttSafeTime(void);
|
||||
int getAttCnt(void);
|
||||
int getLateTime(void);
|
||||
int getAttDmeTime(void);
|
||||
int getAttDmeCnt(void);
|
||||
#endif
|
||||
char* getNoAttIp(int num);
|
||||
#ifdef _NO_TRANS_ANGLE
|
||||
int getTrans6Angle(void);
|
||||
#endif
|
||||
#ifdef _PET_BUG
|
||||
int getPetPoint(int num);
|
||||
#endif
|
||||
#ifdef _VIGOR_SYS
|
||||
int getVigorTime(int num);
|
||||
int getVigorMax(void);
|
||||
#endif
|
||||
#ifdef _AUTO_PK
|
||||
int getAutoPkTime(void);
|
||||
int getAutoPkMinNum(void);
|
||||
int getAutoPkBattleTime(void);
|
||||
int getAutoPkMinLv(void);
|
||||
int getAutoPkVigorPkNum(void);
|
||||
int getAutoPkVigorPkCnt(void);
|
||||
#endif
|
||||
#ifdef _BATTLEMAP_CTRL
|
||||
int getBattleTimeFloor(int num);
|
||||
int getBattleTimePlayerNum(int num);
|
||||
int getBattleTimeSec(int num);
|
||||
#endif
|
||||
#ifdef _FM_SERVERNO_SYS
|
||||
int getFmServerNo(void);
|
||||
char* getFmServerMsg(void);
|
||||
#endif
|
||||
#ifdef _ZHIPIAO_SYSTEM
|
||||
int getZhiPiao(void);
|
||||
int getPiaoTime(void);
|
||||
#endif
|
||||
#ifdef _FMWAR_MSG
|
||||
char* getFmWarMsg(void);
|
||||
#endif
|
||||
#ifdef _FM_WELFARE
|
||||
char* getFmWelfare(int num);
|
||||
#endif
|
||||
#ifdef _FMZUZHANG_MSG
|
||||
char* getFmZuzhang(void);
|
||||
#endif
|
||||
#ifdef _PETMAIL_LV
|
||||
int getPetMailLv(void);
|
||||
int getPetMailCf(void);
|
||||
#endif
|
||||
#ifdef _FMWAR_PLAYERNUM
|
||||
int getFmWarPlayerNum(void);
|
||||
#endif
|
||||
#ifdef _WAN_FIX
|
||||
int getVsFlg(void);
|
||||
#endif
|
||||
#ifdef _WARNPC_CTRL
|
||||
int getPartyMap(int num);
|
||||
int getMapSameIp(int num);
|
||||
#endif
|
||||
#ifdef _NO_DAOLUAN
|
||||
int getStreetTrn(void);
|
||||
int getTalkTrn(void);
|
||||
int getTalkLv(void);
|
||||
char* getTalkMsg(void);
|
||||
char* getTalkName(void);
|
||||
#endif
|
||||
#ifdef _NO_FULLPLAYER_ATT
|
||||
int getNoFullPlayer(void);
|
||||
int getNoFull2Player(void);
|
||||
int getNoCdkeyPlayer(void);
|
||||
int getNoCdkeyMode(void);
|
||||
int getNoCdkeyType(void);
|
||||
int getNoFullTime(void);
|
||||
int getFengType(void);
|
||||
int getNoFullEndPlayer(void);
|
||||
int getNoFullEndTime(void);
|
||||
int getManRenNum(void);
|
||||
int getBigBao(void);
|
||||
int getBigBao2(void);
|
||||
#endif
|
||||
#ifdef _ATTREVERSE_FIX
|
||||
int getAttReverse(void);
|
||||
#endif
|
||||
#ifdef _NEWFM_GOLD
|
||||
int getNewFmGold(void);
|
||||
#endif
|
||||
#ifdef _MERGE_TIME
|
||||
int getMergeTime(void);
|
||||
#endif
|
||||
#ifdef _PETUP_GET_EXP
|
||||
int getPetUpGetExp(void);
|
||||
#endif
|
||||
#ifdef _MM_NO_JIAOBEN
|
||||
int getNoMMJiaoben(void);
|
||||
int getEditBaseTime(void);
|
||||
#endif
|
||||
#ifdef _DP_140_160_MODE
|
||||
int getNewDpMode(void);
|
||||
#endif
|
||||
#ifdef _LOOK_STREET_TIME
|
||||
int getLookStreetTime(void);
|
||||
#endif
|
||||
#ifdef _BATTLE_EQUIT_OTHER
|
||||
int getBattleEquitOther(void);
|
||||
#endif
|
||||
#ifdef _PK_LUCK_MAN
|
||||
int getPkLuckFloor(int floor);
|
||||
char* getPkLuckMapName(int num);
|
||||
int getPkLuckTimeMin(void);
|
||||
int getPkLuckTimeMax(void);
|
||||
int getPkLuckNum(void);
|
||||
int getPkLuckFame(void);
|
||||
int getPkLuckVigor(void);
|
||||
int getPkLuckVipPoint(void);
|
||||
int getPkLuckAmPoint(void);
|
||||
int getPkLuckLevel(void);
|
||||
int getPkLuckBattleTurn(void);
|
||||
#endif
|
||||
#ifdef _NO_DAOLUAN
|
||||
int getTalkFloor(int num);
|
||||
#endif
|
||||
#ifdef _SUPERMAN_FIX
|
||||
int getSuperManPoint(void);
|
||||
#endif
|
||||
#ifdef _PICKUP_ITEM_OTHER
|
||||
int getPickupItem(void);
|
||||
char* getPickItemId(void);
|
||||
#endif
|
||||
#ifdef _FM_LIAOLI
|
||||
int getFmLiaoLiType(void);
|
||||
#endif
|
||||
#ifdef _TRADE_ITEM_FIX
|
||||
int getTradeItemFix(void);
|
||||
#endif
|
||||
#ifdef _PETMAIL_TIME
|
||||
int getPetMailTime(void);
|
||||
#endif
|
||||
int getRandMin(void);
|
||||
int getRandMax(void);
|
||||
#ifdef _GJS_TYPE
|
||||
int getGjsType(void);
|
||||
#endif
|
||||
int getTicketCf(void);
|
||||
char* getTicketMsg(void);
|
||||
|
||||
char* getDefaultKey(int cli_fd);
|
||||
char* getRunningKey(void);
|
||||
char* getSaVersion(void);
|
||||
int getSaType(void);
|
||||
#ifdef _BATTLEEND_FIX
|
||||
int getBattleEndMode(void);
|
||||
#endif
|
||||
#ifdef _BIG_POOL_TYPE
|
||||
int getPetPoolType(void);
|
||||
int getItemPoolType(void);
|
||||
#endif
|
||||
int getNoStayBattle(void);
|
||||
int getRightNum(void);
|
||||
int getRightMode(void);
|
||||
int getErrorMode(void);
|
||||
#ifdef _FLOOR_PARTY_CTRL
|
||||
int getPartyFloor(int num);
|
||||
#endif
|
||||
int getBattleTimtOut(void);
|
||||
int getReloadNpcTime(void);
|
||||
int getReloadNpcType(void);
|
||||
int getOfflineBattleTime(void);
|
||||
int getOfflineCf(void);
|
||||
int getOfflineMaxNum(void);
|
||||
int getOfflineJqmMaxNum(void);
|
||||
int getKongType(void);
|
||||
int getJiFenBaiTan(void);
|
||||
int getNoPkMap(void);
|
||||
int getFmBuffTrans(void);
|
||||
char* getNoMpMagic(void);
|
||||
int getLoginJqmType(void);
|
||||
char* getFmMagicMpRate(int num);
|
||||
int getSameIpNum(void);
|
||||
int getSameJqmNum(void);
|
||||
int getSameJqmAllNum(void);
|
||||
|
||||
int getMmType(void);
|
||||
char* getMmMsg(void);
|
||||
|
||||
int getLockType(void);
|
||||
int getAllTalkPoint(void);
|
||||
#ifdef _NO_RIDE_ID
|
||||
char* getNoRideId(void);
|
||||
#endif
|
||||
int getLoginType(void);
|
||||
|
||||
#ifdef _GET_BATTLE_EXP
|
||||
unsigned int getBattleexp( void );
|
||||
void setBattleexp( int exp );
|
||||
#endif
|
||||
|
||||
#ifdef _PETTRANS_RANGE
|
||||
void setPetTransRangeX(int num);
|
||||
int getPetTransRangeX(void);
|
||||
void setPetTransRangeY(int num);
|
||||
int getPetTransRangeY(void);
|
||||
void setPetTransRangeZ(int num);
|
||||
int getPetTransRangeZ(void);
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_LUA
|
||||
const char *getitemluafile(void);
|
||||
BOOL ITEM_LuaInit(const char * _FileName);
|
||||
#endif
|
||||
|
||||
#ifdef _SAME_IP_ONLINE_NUM
|
||||
int getSameIpOnlineNum();
|
||||
#endif
|
||||
|
||||
#ifdef _CHECK_SEVER_IP
|
||||
int checkServerIp( unsigned int ip );
|
||||
#endif
|
||||
BOOL luareadconfigfile( char* data );
|
||||
|
||||
#ifdef _CAX_ESC_REPORT
|
||||
int getReportItem(unsigned int index);
|
||||
int getVipReportItem(unsigned int index);
|
||||
int getReportLv(void);
|
||||
int getReportTa(void);
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_SHOP_LUA
|
||||
char *getFreePetSkillShopPath();
|
||||
#endif
|
||||
|
||||
#ifdef _CAX_FAMEBUTTON
|
||||
char* getfamebutton( void );
|
||||
#endif
|
||||
|
||||
#ifdef _PET_TRANS_ABILITY
|
||||
int getPetTransAbility();
|
||||
int getPetTransAbility1();
|
||||
int getPetTransAbility2();
|
||||
int getPetTransAbility3();
|
||||
#endif
|
||||
|
||||
#ifdef _PET_3TRANS
|
||||
int getMMPETID1(void);
|
||||
int getMMPETID2(void);
|
||||
#endif
|
||||
|
||||
#ifdef _NO_MAGIC
|
||||
int getnomagicmap(int num);
|
||||
#endif
|
||||
|
||||
#ifdef _illegalpetskill_CF
|
||||
int getIllegalPetskill(int index);
|
||||
#endif
|
||||
|
||||
#ifdef _CAX_PET_EVOLUTION
|
||||
char getpetevotyb(void);
|
||||
int getpetevotyb1(void);
|
||||
#endif
|
||||
|
||||
#ifdef _TRANS_7_COLOR
|
||||
//int getTranColor(void);
|
||||
char getping(void);
|
||||
char getpetsummon(void);
|
||||
#endif
|
||||
|
||||
#ifdef _CAX_PET_ITEMRIDE
|
||||
char getpetitemride(void);
|
||||
#endif
|
||||
|
||||
#ifdef _DAMMAGE_CALC
|
||||
int getDamageCalc();
|
||||
#endif
|
||||
|
||||
#ifdef _CAX_LNS_NLSUOXU
|
||||
int GetConfigLineType(char *TM_ConfigName);
|
||||
char* GetConfigLineVal(char *TM_ConfigName);
|
||||
int getCopymapstartingID( void );
|
||||
#endif
|
||||
|
||||
#ifdef _CAX_FAME_KOUFEI
|
||||
int getfamekoufei();
|
||||
#endif
|
||||
|
||||
#ifdef _CAX_ITEM_ADDEXP
|
||||
int getexptime();
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _SHARE_EXP
|
||||
int getExpShare(void);
|
||||
#endif
|
||||
#ifdef _TEAM_ADDEXP
|
||||
int getTeamAddExp(void);
|
||||
#endif
|
||||
|
||||
#ifdef _NO_STW_ENEMY
|
||||
int getNoSTWNenemy( void );
|
||||
int getNoSTWNenemyPoint( void );
|
||||
#endif
|
||||
|
||||
#ifdef _DEX_FIX
|
||||
int getDexFixPer(void);
|
||||
#endif
|
||||
#ifdef _FM_EXP_ADD
|
||||
unsigned int getFmAddExp( void );
|
||||
#endif
|
20
include/correct_bug.h
Normal file
20
include/correct_bug.h
Normal file
@ -0,0 +1,20 @@
|
||||
#ifndef __CORRECT_BUG_H__
|
||||
#define __CORRECT_BUG_H__
|
||||
|
||||
/* ----------------------- (开放区) ---------------------------*/
|
||||
#define _add_item_log_name // WON ADD 在item的log中增加item名称
|
||||
#define _PETSKILLBUG // Syu ADD 修正宠物问题
|
||||
#define _FIXWOLF // Syu ADD 修正狼人变身Bug
|
||||
#define _FIXMAGICBUG // Syu ADD 修正魔法熟练、抗性暴掉问题
|
||||
#define _FIXPETFALL // Syu ADD 修正落马术
|
||||
#define _FIX_ITEMRELIFE // WON ADD 修正替身娃娃问题
|
||||
#define _FIX_SPEED_UPLEVEL // WON ADD 修正加速
|
||||
#define _FIX_PETMAIL // WON ADD 修正宠邮
|
||||
#define _FIX_EQUIP_ITEM // WON ADD 修正道具需重新装备
|
||||
#define _ADD_PETMAIL_NUM // WON ADD 宠邮数量GM指令
|
||||
#define _FIX_equipNoenemy // WON ADD 修正太阳神首饰
|
||||
#define _FIX_PETMAIL2 // WON ADD 修正宠邮2
|
||||
#define _FIXITEMANISHOW // Syu ADD 修正回合性补血装备道具骑宠时宠物不显示动画问题
|
||||
#define _kr_ip // WON ADD 不锁gm指令ip
|
||||
|
||||
#endif
|
44
include/deathcontend.h
Normal file
44
include/deathcontend.h
Normal file
@ -0,0 +1,44 @@
|
||||
002C:defend.h:032:1:14=48041e4b:16=47d21313:#ifndef __DEFEND_H__
|
||||
#define __DEFEND_H__
|
||||
|
||||
#endif
|
||||
002E:encount.h:0638:1:14=48041e4b:16=47d21313:#ifndef __ENCOUNT_H__
|
||||
#define __ENCOUNT_H__
|
||||
|
||||
#define ENCOUNT_GROUPMAXNUM 10
|
||||
|
||||
BOOL ENCOUNT_initEncount( char* filename );
|
||||
BOOL ENCOUNT_reinitEncount( void );
|
||||
int ENCOUNT_getEncountAreaArray( int floor, int x, int y);
|
||||
int ENCOUNT_getEncountPercentMin( int charaindex, int floor , int x, int y );
|
||||
int ENCOUNT_getEncountPercentMax( int charaindex, int floor , int x, int y );
|
||||
int ENCOUNT_getCreateEnemyMaxNum( int floor , int x, int y );
|
||||
int ENCOUNT_getEncountIndex( int floor , int x, int y );
|
||||
int ENCOUNT_getEncountIndexFromArray( int array );
|
||||
int ENCOUNT_getEncountPercentFromArray( int array );
|
||||
int ENCOUNT_getCreateEnemyMaxNumFromArray( int array );
|
||||
int ENCOUNT_getGroupIdFromArray( int array, int grouparray );
|
||||
int ENCOUNT_getGroupProbFromArray( int array, int grouparray );
|
||||
int ENCOUNT_getZorderFromArray( int array );
|
||||
|
||||
#ifdef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件
|
||||
typedef struct tagENCOUNT_Table
|
||||
{
|
||||
int index;
|
||||
int floor;
|
||||
int encountprob_min; /* 巨件市它件玄割 */
|
||||
int encountprob_max; /* 巨件市它件玄割 */
|
||||
int enemymaxnum; /* 升木分仃衬毛综月井 */
|
||||
int zorder;
|
||||
int groupid[ENCOUNT_GROUPMAXNUM]; /* 弘伙□皿No */
|
||||
int createprob[ENCOUNT_GROUPMAXNUM]; /* 公及弘伙□皿及请蜇 */
|
||||
int event_now;
|
||||
int event_end;
|
||||
int enemy_group; // 怪物的group 编号
|
||||
RECT rect;
|
||||
}ENCOUNT_Table;
|
||||
|
||||
ENCOUNT_Table *ENCOUNT_table;
|
||||
#endif
|
||||
|
||||
#endif
|
4
include/defend.h
Normal file
4
include/defend.h
Normal file
@ -0,0 +1,4 @@
|
||||
#ifndef __DEFEND_H__
|
||||
#define __DEFEND_H__
|
||||
|
||||
#endif
|
22
include/des.h
Normal file
22
include/des.h
Normal file
@ -0,0 +1,22 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
Provided by 王俊川, Northeastern University (www.neu.edu.cn)
|
||||
Email: blackdrn@sohu.com
|
||||
This product is free for use.
|
||||
*/
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#include <stdbool.h>
|
||||
enum {ENCRYPT,DECRYPT};
|
||||
//enum bool{false,true}; // if bool is not supported,use this or just replace with char
|
||||
// and use 1 for true,0 for false;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Type—ENCRYPT:加密,DECRYPT:解密
|
||||
// 输出缓冲区(Out)的长度 >= ((datalen+7)/8)*8,即比datalen大的且是8的倍数的最小正整数
|
||||
// In 可以= Out,此时加/解密后将覆盖输入缓冲区(In)的内容
|
||||
// 当keylen>8时系统自动使用3次DES加/解密,否则使用标准DES加/解密.超过16字节后只取前16字节
|
||||
|
||||
bool Des_Go(char *Out,char *In,long datalen,const char *Key,int keylen,bool Type);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
40
include/encount.h
Normal file
40
include/encount.h
Normal file
@ -0,0 +1,40 @@
|
||||
#ifndef __ENCOUNT_H__
|
||||
#define __ENCOUNT_H__
|
||||
|
||||
#define ENCOUNT_GROUPMAXNUM 10
|
||||
|
||||
BOOL ENCOUNT_initEncount( char* filename );
|
||||
BOOL ENCOUNT_reinitEncount( void );
|
||||
int ENCOUNT_getEncountAreaArray( int floor, int x, int y);
|
||||
int ENCOUNT_getEncountPercentMin( int charaindex, int floor , int x, int y );
|
||||
int ENCOUNT_getEncountPercentMax( int charaindex, int floor , int x, int y );
|
||||
int ENCOUNT_getCreateEnemyMaxNum( int floor , int x, int y );
|
||||
int ENCOUNT_getEncountIndex( int floor , int x, int y );
|
||||
int ENCOUNT_getEncountIndexFromArray( int array );
|
||||
int ENCOUNT_getEncountPercentFromArray( int array );
|
||||
int ENCOUNT_getCreateEnemyMaxNumFromArray( int array );
|
||||
int ENCOUNT_getGroupIdFromArray( int array, int grouparray );
|
||||
int ENCOUNT_getGroupProbFromArray( int array, int grouparray );
|
||||
int ENCOUNT_getZorderFromArray( int array );
|
||||
|
||||
#ifdef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件
|
||||
typedef struct tagENCOUNT_Table
|
||||
{
|
||||
int index;
|
||||
int floor;
|
||||
int encountprob_min; /* 巨件市它件玄割 */
|
||||
int encountprob_max; /* 巨件市它件玄割 */
|
||||
int enemymaxnum; /* 升木分仃衬毛综月井 */
|
||||
int zorder;
|
||||
int groupid[ENCOUNT_GROUPMAXNUM]; /* 弘伙□皿No */
|
||||
int createprob[ENCOUNT_GROUPMAXNUM]; /* 公及弘伙□皿及请蜇 */
|
||||
int event_now;
|
||||
int event_end;
|
||||
int enemy_group; // 怪物的group 编号
|
||||
RECT rect;
|
||||
}ENCOUNT_Table;
|
||||
|
||||
ENCOUNT_Table *ENCOUNT_table;
|
||||
#endif
|
||||
|
||||
#endif
|
258
include/enemy.h
Normal file
258
include/enemy.h
Normal file
@ -0,0 +1,258 @@
|
||||
#ifndef __ENEMY_H__
|
||||
#define __ENEMY_H__
|
||||
|
||||
enum
|
||||
{
|
||||
E_T_SIZE_NORMAL,
|
||||
E_T_SIZE_BIG,
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
E_T_TEMPNO,
|
||||
E_T_INITNUM,
|
||||
E_T_LVUPPOINT,
|
||||
E_T_BASEVITAL,
|
||||
E_T_BASESTR,
|
||||
E_T_BASETGH,
|
||||
E_T_BASEDEX,
|
||||
E_T_MODAI,
|
||||
E_T_GET,
|
||||
E_T_EARTHAT,
|
||||
E_T_WATERAT,
|
||||
E_T_FIREAT,
|
||||
E_T_WINDAT,
|
||||
E_T_POISON, /* 汹仁凶太卞母丢□斥 */
|
||||
E_T_PARALYSIS, /* 仄太木}1 及垫 互匹五卅中[ */
|
||||
E_T_SLEEP, /* 戽曰[垫 匹五卅中 */
|
||||
E_T_STONE, /* 檗[垫 匹五卅中 */
|
||||
E_T_DRUNK, /* 办丹[ 互票互月 */
|
||||
E_T_CONFUSION, /* 渔刭[ 猾 毛赀月 */
|
||||
E_T_PETSKILL1,
|
||||
E_T_PETSKILL2,
|
||||
E_T_PETSKILL3,
|
||||
E_T_PETSKILL4,
|
||||
E_T_PETSKILL5,
|
||||
E_T_PETSKILL6,
|
||||
E_T_PETSKILL7,
|
||||
E_T_RARE,
|
||||
E_T_CRITICAL,
|
||||
E_T_COUNTER,
|
||||
E_T_SLOT,
|
||||
E_T_IMGNUMBER,
|
||||
E_T_PETFLG,
|
||||
E_T_SIZE,
|
||||
E_T_ATOMBASEADD1,
|
||||
E_T_ATOMFIXMIN1,
|
||||
E_T_ATOMFIXMAX1,
|
||||
E_T_ATOMBASEADD2,
|
||||
E_T_ATOMFIXMIN2,
|
||||
E_T_ATOMFIXMAX2,
|
||||
E_T_ATOMBASEADD3,
|
||||
E_T_ATOMFIXMIN3,
|
||||
E_T_ATOMFIXMAX3,
|
||||
E_T_ATOMBASEADD4,
|
||||
E_T_ATOMFIXMIN4,
|
||||
E_T_ATOMFIXMAX4,
|
||||
E_T_ATOMBASEADD5,
|
||||
E_T_ATOMFIXMIN5,
|
||||
E_T_ATOMFIXMAX5,
|
||||
E_T_LIMITLEVEL, // Arminius 7.30 limit level
|
||||
#ifdef _PET_FUSION
|
||||
E_T_FUSIONCODE,
|
||||
#endif
|
||||
#ifdef _PET_AMOI__E
|
||||
E_T_ENABLETRADE,
|
||||
E_T_PETTYPE,
|
||||
E_T_PETTYPESUB,
|
||||
#endif
|
||||
E_T_DATAINTNUM,
|
||||
}ENEMYTEMP_DATAINT;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
E_T_NAME,
|
||||
E_T_ATOMFIXNAME1,
|
||||
E_T_ATOMFIXNAME2,
|
||||
E_T_ATOMFIXNAME3,
|
||||
E_T_ATOMFIXNAME4,
|
||||
E_T_ATOMFIXNAME5,
|
||||
E_T_DATACHARNUM,
|
||||
|
||||
}ENEMYTEMP_DATACHAR;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ENEMY_ID,
|
||||
ENEMY_TEMPNO,
|
||||
ENEMY_LV_MIN,
|
||||
ENEMY_LV_MAX,
|
||||
ENEMY_CREATEMAXNUM,
|
||||
ENEMY_CREATEMINNUM,
|
||||
ENEMY_TACTICS,
|
||||
ENEMY_EXP,
|
||||
ENEMY_DUELPOINT,
|
||||
ENEMY_STYLE,
|
||||
ENEMY_PETFLG, /* 矢永玄卞卅月井升丹井 */
|
||||
|
||||
ENEMY_ITEM1,
|
||||
ENEMY_ITEM2,
|
||||
ENEMY_ITEM3,
|
||||
ENEMY_ITEM4,
|
||||
ENEMY_ITEM5,
|
||||
ENEMY_ITEM6,
|
||||
ENEMY_ITEM7,
|
||||
ENEMY_ITEM8,
|
||||
ENEMY_ITEM9,
|
||||
ENEMY_ITEM10,
|
||||
ENEMY_ITEMPROB1,
|
||||
ENEMY_ITEMPROB2,
|
||||
ENEMY_ITEMPROB3,
|
||||
ENEMY_ITEMPROB4,
|
||||
ENEMY_ITEMPROB5,
|
||||
ENEMY_ITEMPROB6,
|
||||
ENEMY_ITEMPROB7,
|
||||
ENEMY_ITEMPROB8,
|
||||
ENEMY_ITEMPROB9,
|
||||
ENEMY_ITEMPROB10,
|
||||
|
||||
ENEMY_DATAINTNUM,
|
||||
|
||||
}ENEMY_DATAINT;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ENEMY_NAME,
|
||||
ENEMY_TACTICSOPTION,
|
||||
#ifdef _BATTLENPC_WARP_PLAYER
|
||||
ENEMY_ACT_CONDITION,
|
||||
#endif
|
||||
ENEMY_DATACHARNUM,
|
||||
}ENEMY_DATACHAR;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GROUP_ID,
|
||||
GROUP_APPEARBYITEMID, /* 仇及失奶 丞毛 匀化中凶日请蜇允月 -1 反 骰*/
|
||||
GROUP_NOTAPPEARBYITEMID, /* 仇及失奶 丞毛 匀化中凶日请蜇仄卅中 -1 反 骰*/
|
||||
ENEMY_ID1,
|
||||
ENEMY_ID2,
|
||||
ENEMY_ID3,
|
||||
ENEMY_ID4,
|
||||
ENEMY_ID5,
|
||||
ENEMY_ID6,
|
||||
ENEMY_ID7,
|
||||
ENEMY_ID8,
|
||||
ENEMY_ID9,
|
||||
ENEMY_ID10,
|
||||
CREATEPROB1,
|
||||
CREATEPROB2,
|
||||
CREATEPROB3,
|
||||
CREATEPROB4,
|
||||
CREATEPROB5,
|
||||
CREATEPROB6,
|
||||
CREATEPROB7,
|
||||
CREATEPROB8,
|
||||
CREATEPROB9,
|
||||
CREATEPROB10,
|
||||
GROUP_DATAINTNUM,
|
||||
}GROUP_DATAINT;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GROUP_NAME,
|
||||
GROUP_DATACHARNUM,
|
||||
|
||||
}GROUP_DATACHAR;
|
||||
|
||||
|
||||
typedef struct tagENEMY_EnemyTable
|
||||
{
|
||||
int intdata[ENEMY_DATAINTNUM];
|
||||
STRING64 chardata[ENEMY_DATACHARNUM];
|
||||
int enemytemparray;
|
||||
}ENEMY_EnemyTable;
|
||||
|
||||
typedef struct tagENEMYTEMP_Table
|
||||
{
|
||||
int intdata[E_T_DATAINTNUM];
|
||||
//ANDY_EDIT
|
||||
STRING64 chardata[E_T_DATACHARNUM];
|
||||
|
||||
}ENEMYTEMP_Table;
|
||||
|
||||
typedef struct tagGROUP_Table
|
||||
{
|
||||
int intdata[GROUP_DATAINTNUM];
|
||||
STRING32 chardata[GROUP_DATACHARNUM];
|
||||
int enemyarray[CREATEPROB1 - ENEMY_ID1];
|
||||
}GROUP_Table;
|
||||
|
||||
|
||||
|
||||
INLINE BOOL ENEMY_CHECKINDEX( int index);
|
||||
INLINE int ENEMY_setInt( int index, ENEMY_DATAINT element, int data);
|
||||
INLINE int ENEMY_getInt( int index, ENEMY_DATAINT element);
|
||||
|
||||
INLINE int *ENEMY_getIntdata( int index);
|
||||
|
||||
INLINE BOOL ENEMY_setChar( int index ,ENEMY_DATACHAR element, char* new );
|
||||
INLINE char *ENEMY_getChar( int index, ENEMY_DATACHAR element);
|
||||
int ENEMY_getEnemyNum( void);
|
||||
BOOL ENEMY_initEnemy( char* filename );
|
||||
BOOL ENEMY_reinitEnemy( void );
|
||||
int ENEMY_createEnemy( int array, int baselevel );
|
||||
int *ENEMY_getEnemy( int charaindex, int x, int y);
|
||||
int ENEMY_createPetFromEnemyIndex( int charaindex, int array);
|
||||
int ENEMY_createPet( int array, int vital, int str, int tgh, int dex);
|
||||
int ENEMY_getEnemyArrayFromId( int EnemyId);
|
||||
int ENEMY_getEnemyArrayFromTempNo( int EnemyTempNo);
|
||||
int ENEMY_getEnemyIdFromTempNo( int EnemyTempNo);
|
||||
int ENEMY_getEnemyTempNoFromId( int EnemyId);
|
||||
|
||||
#ifdef _TEST_DROPITEMS
|
||||
int ENEMY_TEST_createPetIndex( int array);
|
||||
#endif
|
||||
|
||||
int ENEMYTEMP_getEnemyNum( void);//krynn 2001/12/13
|
||||
INLINE BOOL ENEMYTEMP_CHECKINDEX( int index);
|
||||
INLINE int ENEMYTEMP_setInt( int index, ENEMYTEMP_DATAINT element, int data);
|
||||
INLINE int ENEMYTEMP_getInt( int index, ENEMYTEMP_DATAINT element);
|
||||
INLINE char *ENEMYTEMP_getChar( int index, ENEMYTEMP_DATACHAR element);
|
||||
INLINE BOOL ENEMYTEMP_getInt_setChar( int index ,ENEMYTEMP_DATACHAR element, char* new );
|
||||
INLINE char *ENEMYTEMP_getInt_getChar( int index, ENEMYTEMP_DATACHAR element);
|
||||
int ENEMYTEMP_getInt_getEnemyNum( void);
|
||||
BOOL ENEMYTEMP_getInt_initEnemy( char* filename );
|
||||
BOOL ENEMYTEMP_getInt_reinitEnemy( void );
|
||||
int ENEMYTEMP_getEnemyTempArray( int enemyindex);
|
||||
int ENEMYTEMP_getEnemyTempArrayFromTempNo( int EnemyTempNo);
|
||||
int ENEMYTEMP_getEnemyTempArrayFromInitnum( int EnemyTempNo);
|
||||
|
||||
INLINE int GROUP_setInt( int index, GROUP_DATAINT element, int data);
|
||||
INLINE int GROUP_getInt( int index, GROUP_DATAINT element);
|
||||
INLINE BOOL GROUP_setChar( int index ,GROUP_DATACHAR element, char* new );
|
||||
INLINE char *GROUP_getChar( int index, GROUP_DATACHAR element);
|
||||
int GROUP_getEnemyNum( void);
|
||||
|
||||
BOOL ENEMYTEMP_initEnemy( char* filename );
|
||||
BOOL ENEMYTEMP_reinitEnemy( void );
|
||||
BOOL GROUP_initGroup( char* filename );
|
||||
BOOL GROUP_reinitGroup( void );
|
||||
|
||||
#ifdef _PET_EVOLUTION
|
||||
int EVOLUTION_createPetFromEnemyIndex( int charaindex, int baseindex, int flg);
|
||||
int PET_CheckIncubate( int charaindex);
|
||||
BOOL PETFUSION_getIndexForChar( int toindex, int *MainIndex, int *Subindex1,int *Subindex2, char *data);
|
||||
int NPC_getFusionTableForBase( int charaindex, int petindex1, int petindex2 );
|
||||
int NPC_getPetArrayForNo( int PetCode);
|
||||
BOOL PET_getEvolutionAns( int petindex, int *base);
|
||||
#endif
|
||||
|
||||
int PETFUSION_SetNewEgg( int toindex , int petindex, int array, int *work, int *skill1, int *skill2);
|
||||
BOOL PETFUSION_AddEgg(int toindex, int petID, int PetCode);
|
||||
|
||||
#ifdef _PET_TRANS
|
||||
int GetNewPet( int toindex , int petindex, int array, int *work);
|
||||
#endif
|
||||
|
||||
#endif
|
207
include/enemyexptbl.h
Normal file
207
include/enemyexptbl.h
Normal file
@ -0,0 +1,207 @@
|
||||
#ifndef __ENEMY_EXPTBL_H__
|
||||
#define __ENEMY_EXPTBL_H__
|
||||
|
||||
|
||||
static int enemybaseexptbl[] = {
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
9,
|
||||
12,
|
||||
15,
|
||||
18,
|
||||
22,
|
||||
26,
|
||||
30,
|
||||
35,
|
||||
40,
|
||||
46,
|
||||
52,
|
||||
58,
|
||||
65,
|
||||
72,
|
||||
79,
|
||||
87,
|
||||
95,
|
||||
104,
|
||||
113,
|
||||
122,
|
||||
131,
|
||||
141,
|
||||
151,
|
||||
162,
|
||||
173,
|
||||
184,
|
||||
196,
|
||||
208,
|
||||
220,
|
||||
233,
|
||||
246,
|
||||
260,
|
||||
274,
|
||||
288,
|
||||
303,
|
||||
318,
|
||||
333,
|
||||
348,
|
||||
365,
|
||||
381,
|
||||
398,
|
||||
415,
|
||||
432,
|
||||
450,
|
||||
468,
|
||||
486,
|
||||
506,
|
||||
525,
|
||||
545,
|
||||
564,
|
||||
585,
|
||||
606,
|
||||
627,
|
||||
648,
|
||||
670,
|
||||
692,
|
||||
714,
|
||||
737,
|
||||
760,
|
||||
784,
|
||||
808,
|
||||
832,
|
||||
857,
|
||||
882,
|
||||
907,
|
||||
933,
|
||||
959,
|
||||
956,
|
||||
1012,
|
||||
1040,
|
||||
1067,
|
||||
1095,
|
||||
1123,
|
||||
1152,
|
||||
1181,
|
||||
1210,
|
||||
1240,
|
||||
1270,
|
||||
1300,
|
||||
1331,
|
||||
1362,
|
||||
1394,
|
||||
1426,
|
||||
1458,
|
||||
1490,
|
||||
1524,
|
||||
1557,
|
||||
1590,
|
||||
1625,
|
||||
1659,
|
||||
1694,
|
||||
1729,
|
||||
1764,
|
||||
1800, // level 100
|
||||
1836,
|
||||
1872,
|
||||
1909,
|
||||
1946,
|
||||
1983,
|
||||
2021,
|
||||
2059,
|
||||
2097,
|
||||
2136,
|
||||
2175, // level 110
|
||||
2214,
|
||||
2254,
|
||||
2294,
|
||||
2334,
|
||||
2374,
|
||||
2414,
|
||||
2455,
|
||||
2496,
|
||||
2537,
|
||||
2578, // level 120
|
||||
2619,
|
||||
2661,
|
||||
2703,
|
||||
2745,
|
||||
2787,
|
||||
2829,
|
||||
2872,
|
||||
2915,
|
||||
2958,
|
||||
3000, // level 130
|
||||
3043,
|
||||
3088,
|
||||
3132,
|
||||
3176,
|
||||
3220,
|
||||
3264,
|
||||
3309,
|
||||
3354,
|
||||
3399,
|
||||
3444, // level 140
|
||||
3489,
|
||||
3535,
|
||||
3581,
|
||||
3627,
|
||||
3673,
|
||||
3719,
|
||||
3765,
|
||||
3812,
|
||||
3859,
|
||||
3906, // level 150
|
||||
3953,
|
||||
4000,
|
||||
4047,
|
||||
4095,
|
||||
4143,
|
||||
4191,
|
||||
4239,
|
||||
4287,
|
||||
4335,
|
||||
4384, // level 160
|
||||
4433,
|
||||
4482,
|
||||
4531,
|
||||
4580,
|
||||
4629,
|
||||
4679,
|
||||
4729,
|
||||
4779,
|
||||
4829,
|
||||
4879, // level 170
|
||||
4929,
|
||||
4980,
|
||||
5031,
|
||||
5082,
|
||||
5133,
|
||||
5184,
|
||||
5235,
|
||||
5287,
|
||||
5339,
|
||||
5391, // level 180
|
||||
5443,
|
||||
5495,
|
||||
5547,
|
||||
5599,
|
||||
5652,
|
||||
5705,
|
||||
5758,
|
||||
5811,
|
||||
5864,
|
||||
5917, // level 190
|
||||
5970,
|
||||
6024,
|
||||
6078,
|
||||
6132,
|
||||
6186,
|
||||
6240,
|
||||
6295,
|
||||
6350,
|
||||
6405,
|
||||
6460, // level 200
|
||||
};
|
||||
#endif
|
9
include/event.h
Normal file
9
include/event.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef __EVENT_H__
|
||||
#define __EVENT_H__
|
||||
|
||||
INLINE BOOL EVENT_CHECKEVENTINDEX( int event);
|
||||
int EVENT_main( int charaindex,int event, int x, int y);
|
||||
|
||||
|
||||
#endif
|
||||
|
225
include/family.h
Normal file
225
include/family.h
Normal file
@ -0,0 +1,225 @@
|
||||
#ifndef __FAMILY_H__
|
||||
#define __FAMILY_H__
|
||||
|
||||
#include "version.h"
|
||||
#include "common.h"
|
||||
#include "util.h"
|
||||
#include "net.h"
|
||||
#include "time.h"
|
||||
|
||||
#define FAMILY_MAXNUM 1000 // 家族数量
|
||||
#ifdef _FMVER21
|
||||
#define FAMILY_MAXMEMBER 200 // 家族人数
|
||||
#define FAMILY_MAXCHANNELMEMBER 50 // 频道人数
|
||||
#else
|
||||
#define FAMILY_MAXMEMBER 50 // 家族人数
|
||||
#define FAMILY_MAXCHANNELMEMBER 10 // 频道人数
|
||||
#endif
|
||||
#define FAMILY_MAXCHANNEL 5 // 家族频道
|
||||
|
||||
#define CHAR_MAXNAME 32
|
||||
#define CHAR_MAXID 20
|
||||
#define MINFMLEVLEFORPOINT 3 // 3 申请庄园最低等级
|
||||
#define FMLEADERLV 30 // 族长等级
|
||||
|
||||
#ifdef _FAMILY_MANORNUM_CHANGE
|
||||
#define FAMILY_FMPKFLOOR 15 // 家族PK图层
|
||||
#else
|
||||
#define FAMILY_FMPKFLOOR 9 // 家族PK图层
|
||||
#define FMPOINTNUM 4 // 有据点家族的最大数量
|
||||
#define MANORNUM 4
|
||||
#define FAMILY_MAXHOME 4 // 家族据点
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
FM_TOP_INTEGRATE = 1, // DPTOP 综合
|
||||
FM_TOP_ADV, // DPTOP 冒险
|
||||
FM_TOP_FEED, // DPTOP 饲育
|
||||
FM_TOP_SYNTHESIZE, // DPTOP 合成
|
||||
FM_TOP_DEALFOOD, // DPTOP 料理
|
||||
FM_TOP_PK, // DPTOP PK
|
||||
#ifdef _NEW_MANOR_LAW
|
||||
FM_TOP_MOMENTUM = 8, // DPTOP 气势
|
||||
#endif
|
||||
FM_TOP_NUM, // DPTOP 数量
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
FM_FIX_ACCEPTFLAG = 1,
|
||||
FM_FIX_FMPK,
|
||||
FM_FIX_FMPET,
|
||||
FM_FIX_FMRULE,
|
||||
FM_FIX_DELFMTIME,
|
||||
FM_FIX_FMGOLD,
|
||||
FM_FIX_FMADV,
|
||||
FM_FIX_FMFEED,
|
||||
FM_FIX_FMSYNTHESIZE,
|
||||
FM_FIX_FMDEALFOOD,
|
||||
FM_FIX_FMLEADERCHANGE,
|
||||
#ifdef _NEW_MANOR_LAW
|
||||
FM_FIX_FMMOMENTUM,
|
||||
FM_FIX_FAME,
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
* 扔□田 及职及桦赭午及 cdkey charname 及赢今毛宁六月凶户卞
|
||||
* CHEKEYLEN, CHARNAMELEN
|
||||
* 毛银丹方丹卞 凳[
|
||||
*/
|
||||
|
||||
void CHAR_Family(int fd, int index, char* message);
|
||||
void ACAddFM(int fd, int result, int fmindex, int index);
|
||||
void ACJoinFM(int fd, int result, int recv);
|
||||
void ACLeaveFM(int fd, int result, int resultflag);
|
||||
void ACDelFM(int fd, int result);
|
||||
void ACShowFMList(int ret, int fmnum, char *data);
|
||||
void ACFMDetail(int ret, char *data, int charfdid);
|
||||
void ACShowMemberList(int result, int index, int fmnumm,
|
||||
int fmacceptflag, int fmjoinnum, char *data);
|
||||
void ACShowDpTop(int result,int num, char *data, int kindflag);
|
||||
void ACShowPointList(int result, char *data);
|
||||
void ACShowFMMemo(int result, int index, int num, int dataindex, char *data);
|
||||
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
void ACFMCharLogin(int fd, int ret, int index, int floor, int fmdp,
|
||||
int joinflag, int fmsetupflag, int flag, int charindex, int charfame
|
||||
#ifdef _NEW_MANOR_LAW
|
||||
,int momentum
|
||||
#endif
|
||||
);
|
||||
#else
|
||||
void ACFMCharLogin(int fd, int ret, int index, int floor, int fmdp,
|
||||
int joinflag, int fmsetupflag, int flag, int charindex);
|
||||
#endif
|
||||
|
||||
void ACFMPointList(int ret, char *data);
|
||||
void ACSetFMPoint(int ret, int r, int clifd);
|
||||
void ACFMAnnounce(int ret, char *fmname, int fmindex, int index, int kindflag,
|
||||
char *data, int color);
|
||||
void ACFixFMPK(int winindex, int loseindex, int data);
|
||||
void ACFMJob( int fd, int ret, char* data1, char* data2 );
|
||||
|
||||
void FAMILY_Add(int fd, int meindex, char *message);
|
||||
void FAMILY_Join(int fd, int meindex, char *message);
|
||||
void FAMILY_Leave(int fd, int meindex, char *message);
|
||||
void FAMILY_Detail(int fd, int meindex, char *message);
|
||||
void FAMILY_CheckMember(int fd, int meindex, char *message);
|
||||
void FAMILY_Channel(int fd, int meindex, char *message);
|
||||
void FAMILY_Bank(int fd, int meindex, char *message);
|
||||
void FAMILY_SetPoint(int fd, int meindex, char *message);
|
||||
void FAMILY_Init(void);
|
||||
void FAMILY_SetAcceptFlag(int fd, int meindex, char *message);
|
||||
void FAMILY_FixRule( int fd, int meindex, char* message );
|
||||
int FAMILY_RidePet( int fd, int meindex, char* message );
|
||||
void FAMILY_LeaderFunc( int fd, int meindex, char* message );
|
||||
|
||||
#ifdef _ADD_FAMILY_TAX // WON ADD 增加庄园税收
|
||||
void GS_ASK_TAX(void);
|
||||
void FAMILY_FIX_TAX( int fd, int index, char* message);
|
||||
#endif
|
||||
|
||||
void SetFMPetVarInit(int meindex);
|
||||
void SetFMVarInit(int meindex);
|
||||
|
||||
|
||||
int CheckFMLeader(int meindex);
|
||||
int getFmLv(int playerindex);
|
||||
|
||||
void getNewFMList( void );
|
||||
void checkFamilyIndex( void );
|
||||
|
||||
int CheckLeaderQ(int meindex);
|
||||
|
||||
|
||||
// shan add Begin
|
||||
struct FMMEMBER_LIST
|
||||
{
|
||||
// int fmindex;
|
||||
int fmnum;
|
||||
int fmjoinnum;
|
||||
// BOOL use; // 0->没使用 1->使用
|
||||
int memberindex[FAMILY_MAXMEMBER];
|
||||
char numberlistarray[FAMILY_MAXMEMBER][64];
|
||||
char memo[35][220]; // family dengon
|
||||
int accept; // 召募成员与否
|
||||
int memonum;
|
||||
int memoindex;
|
||||
};
|
||||
// 家族之间的留言板
|
||||
struct FMS_MEMO
|
||||
{
|
||||
char memo[140][220];
|
||||
int memonum;
|
||||
int memoindex;
|
||||
};
|
||||
// 家族强者表
|
||||
struct FMS_DPTOP
|
||||
{
|
||||
int num; // 记录有多少个家族(综合)
|
||||
char topmemo[FAMILY_MAXNUM][128];
|
||||
int fmtopid[FAMILY_MAXNUM]; // 家族索引
|
||||
#ifdef _FMVER21
|
||||
int fmtopdp[FAMILY_MAXNUM]; // 家族综合声望
|
||||
#endif
|
||||
#ifdef _NEW_MANOR_LAW
|
||||
int fmMomentum[FAMILY_MAXNUM]; // 家族气势
|
||||
char momentum_topmemo[FAMILY_MAXNUM][96]; // 家族气势 top
|
||||
int momentum_topid[FAMILY_MAXNUM]; // 家族气势 top id 索引
|
||||
#endif
|
||||
int adv_num; // 冒险
|
||||
char adv_topmemo[30][96];
|
||||
int feed_num; // 伺育
|
||||
char feed_topmemo[30][96];
|
||||
int syn_num; // 合成
|
||||
char syn_topmemo[30][96];
|
||||
int food_num; // 料理
|
||||
char food_topmemo[30][96];
|
||||
int pk_num; // PK
|
||||
char pk_topmemo[30][96];
|
||||
};
|
||||
// 家族据点
|
||||
struct FM_POINTLIST
|
||||
{
|
||||
char pointlistarray[FAMILY_MAXHOME][1024]; // Arminius: 32->1024
|
||||
#ifdef _NEW_MANOR_LAW
|
||||
int fm_momentum[FAMILY_MAXHOME]; // 记录挑战时期开始时的守庄家族气势值
|
||||
BOOL fm_inwar[FAMILY_MAXHOME]; // 此庄园是否进行庄园排程中
|
||||
#endif
|
||||
};
|
||||
// 家族PK图层
|
||||
struct FM_PKFLOOR
|
||||
{
|
||||
int fl;
|
||||
};
|
||||
// End
|
||||
|
||||
#ifdef _NEW_MANOR_LAW
|
||||
typedef struct _ManorSchedule_t{
|
||||
int iFmIndex[10]; // 排入挑战排程的家族索引
|
||||
int iFmMomentum[10]; // 家族气势
|
||||
int iSort[10]; // 排名用
|
||||
char szMemo[10][256]; // 记录: 家族名称|约战时间|家族气势
|
||||
char szFmName[10][32]; // 家族名称
|
||||
struct tm tm1[10]; // 记录挑战时间
|
||||
}ManorSchedule_t;
|
||||
|
||||
extern ManorSchedule_t ManorSchedule[MANORNUM];
|
||||
#endif
|
||||
|
||||
#define MAXFAMILYLIST 64*1024
|
||||
extern char familyListBuf[MAXFAMILYLIST];
|
||||
|
||||
void JoinMemberIndex( int charaindex, int fmindexi);
|
||||
|
||||
int channelMember[FAMILY_MAXNUM][FAMILY_MAXCHANNEL][FAMILY_MAXMEMBER];
|
||||
int familyMemberIndex[FAMILY_MAXNUM][FAMILY_MAXMEMBER];
|
||||
|
||||
#ifdef _CAX_LNS_CHARSUOXU
|
||||
int Char_GetFm( int id, int x);
|
||||
char * FM_getManorData(int ManorId,int Flg);
|
||||
#endif
|
||||
|
||||
#endif
|
5
include/function.h
Normal file
5
include/function.h
Normal file
@ -0,0 +1,5 @@
|
||||
#ifndef __FUNCTION_H__
|
||||
#define __FUNCTION_H__
|
||||
BOOL initFunctionTable( void );
|
||||
void* getFunctionPointerFromName( char* funcname );
|
||||
#endif
|
59
include/handletime.h
Normal file
59
include/handletime.h
Normal file
@ -0,0 +1,59 @@
|
||||
#ifndef __HANDLETIME_H__
|
||||
#define __HANDLETIME_H__
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __HANDLETIME_C__
|
||||
#define EXTERN
|
||||
#else /*__HANDLETIME_C__*/
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
EXTERN struct timeval NowTime;
|
||||
EXTERN int DEBUG_ADJUSTTIME;
|
||||
|
||||
BOOL setNewTime( void );
|
||||
#ifdef _ASSESS_SYSEFFICACY
|
||||
void Assess_InitSysEfficacy( void);
|
||||
void Assess_SysEfficacy( int flg);
|
||||
void ASSESS_getSysEfficacy( float *TVsec);
|
||||
#ifdef _ASSESS_SYSEFFICACY_SUB
|
||||
void Assess_SysEfficacy_sub( int flg, int loop);
|
||||
void ASSESS_getSysEfficacy_sub( float *TVsec, int loop);
|
||||
#endif
|
||||
#endif
|
||||
// WON REM
|
||||
//struct tm *localtime(const time_t *timep);
|
||||
|
||||
/*仇仇井日票}HiO[LS凛棉楮溢[*/
|
||||
/* 凛棉150(坌)*60=9000 =750*12 匹 LS1 */
|
||||
/* LS1200凛棉 LS1 */
|
||||
/* LS100 匹 LS1 */
|
||||
typedef struct tagLSTIME
|
||||
{
|
||||
int year;
|
||||
int day;
|
||||
int hour;
|
||||
}LSTIME;
|
||||
|
||||
#define NIGHT_TO_MORNING 700
|
||||
#define MORNING_TO_NOON 930
|
||||
#define NOON_TO_EVENING 200
|
||||
#define EVENING_TO_NIGHT 300
|
||||
|
||||
typedef enum
|
||||
{
|
||||
LS_NIGHT = 0,
|
||||
LS_MORNING ,
|
||||
LS_NOON ,
|
||||
LS_EVENING ,
|
||||
}LSTIME_SECTION;
|
||||
|
||||
void RealTimeToLSTime(long t , LSTIME *lstime);
|
||||
/*void LSTimeToRealTime( LSTIME *lstime, long *t);*/
|
||||
LSTIME_SECTION getLSTime (LSTIME *lstime);
|
||||
|
||||
#endif
|
17
include/init.h
Normal file
17
include/init.h
Normal file
@ -0,0 +1,17 @@
|
||||
#ifndef __INIT_H__
|
||||
#define __INIT_H__
|
||||
#include "common.h"
|
||||
BOOL init( int argc , char** argv, char** env );
|
||||
BOOL yanzheng_init( int argc , char** argv, char** env );
|
||||
#ifdef _ITEM_QUITPARTY
|
||||
|
||||
typedef struct tagDisappearItem
|
||||
{
|
||||
char string[64];
|
||||
}DisappearItem;
|
||||
DisappearItem *Disappear_Item;
|
||||
int itemquitparty_num;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
490
include/item.h
Normal file
490
include/item.h
Normal file
@ -0,0 +1,490 @@
|
||||
|
||||
#ifndef __ITEM_H__
|
||||
#define __ITEM_H__
|
||||
|
||||
//#include "char.h"
|
||||
|
||||
#define NULLITEM "0"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ITEM_FIST =0,
|
||||
ITEM_AXE,
|
||||
ITEM_CLUB,
|
||||
ITEM_SPEAR,
|
||||
ITEM_BOW,
|
||||
ITEM_SHIELD,
|
||||
ITEM_HELM,
|
||||
ITEM_ARMOUR,
|
||||
|
||||
ITEM_BRACELET =8,
|
||||
ITEM_MUSIC,
|
||||
ITEM_NECKLACE,
|
||||
ITEM_RING,
|
||||
ITEM_BELT,
|
||||
ITEM_EARRING,
|
||||
ITEM_NOSERING,
|
||||
ITEM_AMULET,
|
||||
/* ****** */
|
||||
ITEM_OTHER =16,
|
||||
ITEM_BOOMERANG, // 回旋标
|
||||
ITEM_BOUNDTHROW, // 投掷斧头
|
||||
ITEM_BREAKTHROW, // 投掷石
|
||||
ITEM_DISH =20,
|
||||
#ifdef _ITEM_INSLAY
|
||||
ITEM_METAL,
|
||||
ITEM_JEWEL,
|
||||
#endif
|
||||
#ifdef _ITEM_CHECKWARES
|
||||
ITEM_WARES, //货物
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_EQUITSPACE
|
||||
ITEM_WBELT, //腰带
|
||||
ITEM_WSHIELD, //盾
|
||||
ITEM_WSHOES, //鞋子
|
||||
#endif
|
||||
#ifdef _EQUIT_NEWGLOVE
|
||||
ITEM_WGLOVE, //手套
|
||||
#endif
|
||||
|
||||
#ifdef _ALCHEMIST
|
||||
ITEM_ALCHEMIST =30,
|
||||
#endif
|
||||
|
||||
#ifdef _PET_ITEM
|
||||
ITEM_PET_HEAD,
|
||||
ITEM_PET_TOOTH,
|
||||
ITEM_PET_CLAW,
|
||||
ITEM_PET_BREAST,
|
||||
ITEM_PET_BACK,
|
||||
ITEM_PET_WING,
|
||||
ITEM_PET_FEET,
|
||||
#endif
|
||||
|
||||
#ifdef _ANGEL_SUMMON
|
||||
//ITEM_ANGELTOKEN,
|
||||
//ITEM_HEROTOKEN,
|
||||
#endif
|
||||
|
||||
ITEM_CATEGORYNUM,
|
||||
|
||||
}ITEM_CATEGORY;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ITEM_FIELD_ALL,
|
||||
ITEM_FIELD_BATTLE,
|
||||
ITEM_FIELD_MAP,
|
||||
}ITEM_FIELDTYPE;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ITEM_TARGET_MYSELF,
|
||||
ITEM_TARGET_OTHER,
|
||||
ITEM_TARGET_ALLMYSIDE,
|
||||
ITEM_TARGET_ALLOTHERSIDE,
|
||||
ITEM_TARGET_ALL,
|
||||
}ITEM_TARGETTYPE;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ITEM_ID,
|
||||
ITEM_BASEIMAGENUMBER,
|
||||
ITEM_COST,
|
||||
ITEM_TYPE,
|
||||
ITEM_ABLEUSEFIELD,
|
||||
ITEM_TARGET,
|
||||
ITEM_LEVEL, /* LEVEL */
|
||||
#ifdef _ITEM_MAXUSERNUM
|
||||
ITEM_DAMAGEBREAK, //物品使用次数
|
||||
#endif
|
||||
|
||||
#ifdef _ITEMSET4_TXT
|
||||
ITEM_USEPILENUMS, //物品堆叠次数
|
||||
ITEM_CANBEPILE, //是否可堆叠
|
||||
|
||||
ITEM_NEEDSTR,
|
||||
ITEM_NEEDDEX,
|
||||
ITEM_NEEDTRANS,
|
||||
ITEM_NEEDPROFESSION,
|
||||
#endif
|
||||
|
||||
#ifdef _TAKE_ITEMDAMAGE
|
||||
ITEM_DAMAGECRUSHE,
|
||||
ITEM_MAXDAMAGECRUSHE,
|
||||
#endif
|
||||
|
||||
#ifdef _ADD_DEAMGEDEFC
|
||||
ITEM_OTHERDAMAGE,
|
||||
ITEM_OTHERDEFC,
|
||||
#endif
|
||||
|
||||
#ifdef _SUIT_ITEM
|
||||
ITEM_SUITCODE,
|
||||
#endif
|
||||
|
||||
ITEM_ATTACKNUM_MIN, /* 斓 猾荚醒 */
|
||||
ITEM_ATTACKNUM_MAX, /* 嫖 猾荚醒 */
|
||||
ITEM_MODIFYATTACK, /* 猾 祭汹 */
|
||||
ITEM_MODIFYDEFENCE, /* 豢 祭汹 */
|
||||
ITEM_MODIFYQUICK, /* QUICK 祭汹 */
|
||||
|
||||
ITEM_MODIFYHP, /* HP 祭汹 */
|
||||
ITEM_MODIFYMP, /* MP 祭汹 */
|
||||
ITEM_MODIFYLUCK, /* LUCK 祭汹 */
|
||||
ITEM_MODIFYCHARM, /* CHARM 祭汹 */
|
||||
ITEM_MODIFYAVOID, /* 荚 膜恳 */
|
||||
ITEM_MODIFYATTRIB, /* 箪岭膜恳 */
|
||||
ITEM_MODIFYATTRIBVALUE, /* 箪岭膜恳袄 */
|
||||
ITEM_MAGICID, /* 热诸 寞 */
|
||||
ITEM_MAGICPROB, /* 热诸 */
|
||||
ITEM_MAGICUSEMP, /* 壅 MP */
|
||||
|
||||
#ifdef _ITEMSET5_TXT
|
||||
ITEM_MODIFYARRANGE,
|
||||
ITEM_MODIFYSEQUENCE,
|
||||
|
||||
ITEM_ATTACHPILE,
|
||||
ITEM_HITRIGHT, //额外命中
|
||||
#endif
|
||||
#ifdef _ITEMSET6_TXT
|
||||
ITEM_NEGLECTGUARD,
|
||||
// ITEM_BEMERGE,
|
||||
#endif
|
||||
#ifdef _PETITEM__AMOI_E
|
||||
ITEM_PETFIX0,
|
||||
ITEM_PETFIX1,
|
||||
ITEM_PETFIX2,
|
||||
ITEM_PETFIX3,
|
||||
ITEM_PETFIX4,
|
||||
ITEM_PETFIX5,
|
||||
ITEM_PETFIX6,
|
||||
ITEM_PETFIX7,
|
||||
#endif
|
||||
/* 旦 □正旦膜恳袄[*/
|
||||
ITEM_POISON, /* 汹仁凶太卞母丢□斥 */
|
||||
ITEM_PARALYSIS, /* 仄太木}1 及垫 互匹五卅中[ */
|
||||
ITEM_SLEEP, /* 戽曰[垫 匹五卅中 */
|
||||
ITEM_STONE, /* 檗[垫 匹五卅中 */
|
||||
ITEM_DRUNK, /* 办丹[ 互票互月 */
|
||||
ITEM_CONFUSION, /* 渔刭[ 猾 毛赀月 */
|
||||
|
||||
ITEM_CRITICAL, /* 弁伉 奴市伙 膜恳 */
|
||||
|
||||
ITEM_USEACTION, /* 银匀凶凛及失弁扑亦件 */
|
||||
ITEM_DROPATLOGOUT, /* 夫弘失它玄允月凛卞 允井升丹井 */
|
||||
ITEM_VANISHATDROP, /* 仄凶凛卞壅尹月井升丹井 */
|
||||
ITEM_ISOVERED, /* 晓卞昙匀井日日木月井升丹井[*/
|
||||
ITEM_CANPETMAIL, /* 矢永玄丢□伙匹霜木月井 */
|
||||
ITEM_CANMERGEFROM, /* 宁岳葭卞卅木月井 */
|
||||
ITEM_CANMERGETO, /* 宁岳燮卞卅木月井 */
|
||||
|
||||
ITEM_INGVALUE0, /* 岳坌(5蜊坌) */
|
||||
ITEM_INGVALUE1,
|
||||
ITEM_INGVALUE2,
|
||||
ITEM_INGVALUE3,
|
||||
ITEM_INGVALUE4,
|
||||
#ifdef _PETITEM__AMOI_E
|
||||
ITEM_TYPEOFITEM,
|
||||
#endif
|
||||
ITEM_PUTTIME, /* 失奶 丞互 井木凶凛棉 */
|
||||
ITEM_LEAKLEVEL, /* 怍互升木分仃壬木凶井 */
|
||||
ITEM_MERGEFLG, /* 宁岳今木凶失奶 丞井升丹井 */
|
||||
ITEM_CRUSHLEVEL, /* 莽木蘸宁中 0 2 ㄟ反莽木化卅中 2反蝈莽 */
|
||||
|
||||
ITEM_VAR1, /* 迕综仅 */
|
||||
ITEM_VAR2, /* 迕综仅 */
|
||||
ITEM_VAR3, /* 迕综仅 */
|
||||
ITEM_VAR4, /* 迕综仅 */
|
||||
ITEM_TIME,
|
||||
#ifdef _ITEM_COLOER
|
||||
ITEM_COLOER,
|
||||
#endif
|
||||
ITEM_DATAINTNUM,
|
||||
|
||||
}ITEM_DATAINT;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ITEM_NAME, /* 蟆 癫及 蟆 */
|
||||
ITEM_SECRETNAME, /* 蟆 凳今木月第 岭 曰 */
|
||||
ITEM_EFFECTSTRING, /* 躲绊 侬 */
|
||||
ITEM_ARGUMENT, /* 失奶 丞及娄醒 */
|
||||
#ifdef _ITEM_INSLAY
|
||||
ITEM_TYPECODE,
|
||||
ITEM_INLAYCODE,
|
||||
#endif
|
||||
ITEM_CDKEY, /* 失奶 丞及 蟆毛 赓卞 凳仄凶谛及 */
|
||||
#ifdef _ITEM_FORUSERNAMES
|
||||
ITEM_FORUSERNAME,
|
||||
ITEM_FORUSERCDKEY,
|
||||
#endif
|
||||
// CoolFish: 2001/10/11
|
||||
#ifdef _UNIQUE_P_I
|
||||
ITEM_UNIQUECODE, /* 物品编码 */
|
||||
#endif
|
||||
|
||||
ITEM_INGNAME0, /* 岳坌及 蟆(5蜊坌) */
|
||||
ITEM_INGNAME1,
|
||||
ITEM_INGNAME2,
|
||||
ITEM_INGNAME3,
|
||||
ITEM_INGNAME4,
|
||||
|
||||
|
||||
ITEM_INITFUNC, /* 娄醒
|
||||
* ITEM_Item*
|
||||
* 忒曰袄 BOOL
|
||||
* 忒曰袄及啦 反 CHAR_INITFUNC
|
||||
* 午 元 */
|
||||
ITEM_FIRSTFUNCTION = ITEM_INITFUNC,
|
||||
ITEM_PREOVERFUNC, /* CHAR_PREOVERFUNC 毛辅寰 */
|
||||
ITEM_POSTOVERFUNC, /* CHAR_POSTOVERFUNC 毛辅寰*/
|
||||
ITEM_WATCHFUNC, /* CHAR_WATCHFUNC 毛辅寰 */
|
||||
ITEM_USEFUNC, /* 娄醒反}
|
||||
* int charaindex 平乓仿奶件犯永弁旦
|
||||
* int charitemindex 愤坌及
|
||||
* 失奶 丞 及窒
|
||||
* 毛银匀凶井
|
||||
*/
|
||||
ITEM_ATTACHFUNC, /* 娄醒反}
|
||||
* int charaindex 平乓仿奶件犯永弁旦
|
||||
* int itemindex 失奶 丞奶件犯永弁旦
|
||||
* 平乓仿弁正及 匀化中月失奶 丞
|
||||
* 及失奶 丞 匹及奶件犯永弁旦
|
||||
* 匹反卅中仪卞镗啦[
|
||||
*/
|
||||
ITEM_DETACHFUNC, /* 娄醒反}
|
||||
* int charaindex 平乓仿奶件犯永弁旦
|
||||
* int itemindex 失奶 丞奶件犯永弁旦
|
||||
* 平乓仿弁正及 匀化中月失奶 丞
|
||||
* 及失奶 丞 匹及奶件犯永弁旦
|
||||
* 匹反卅中仪卞镗啦[
|
||||
*/
|
||||
ITEM_DROPFUNC, /* 午仄凶午五
|
||||
* 娄醒反
|
||||
* int charaindex 午仄凶平乓仿
|
||||
* int itemindex 失奶 丞奶件犯永弁旦
|
||||
*/
|
||||
ITEM_PICKUPFUNC, /* 失奶 丞毛胶匀凶凛
|
||||
* 娄醒反
|
||||
* int charaindex 胶匀凶平乓仿index
|
||||
* int itemindex 失奶 丞奶件犯永弁旦
|
||||
*/
|
||||
#ifdef _Item_ReLifeAct
|
||||
ITEM_DIERELIFEFUNC, /*ANDY_ADD
|
||||
复活道具
|
||||
*/
|
||||
#endif
|
||||
#ifdef _PETITEM__AMOI_E
|
||||
ITEM_PETEQUITALLOW,
|
||||
ITEM_PETEQUITFORBIT,
|
||||
#endif
|
||||
#ifdef _PICKUP_ITEM_OTHER
|
||||
ITEM_FROMCDKEY,
|
||||
#endif
|
||||
|
||||
ITEM_LASTFUNCTION,
|
||||
|
||||
ITEM_DATACHARNUM = ITEM_LASTFUNCTION,
|
||||
|
||||
#ifdef _ANGEL_SUMMON
|
||||
ITEM_ANGELMISSION = ITEM_INGNAME0,
|
||||
ITEM_ANGELINFO = ITEM_INGNAME1,
|
||||
ITEM_HEROINFO = ITEM_INGNAME2,
|
||||
#endif
|
||||
|
||||
}ITEM_DATACHAR;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ITEM_WORKOBJINDEX,
|
||||
ITEM_WORKCHARAINDEX,
|
||||
#ifdef _ITEM_ORNAMENTS
|
||||
ITEM_CANPICKUP,
|
||||
#endif
|
||||
#ifdef _ITEM_TIME_LIMIT
|
||||
ITEM_WORKTIMELIMIT,
|
||||
#endif
|
||||
ITEM_WORKDATAINTNUM,
|
||||
}ITEM_WORKDATAINT;
|
||||
|
||||
|
||||
|
||||
//typedef struct tagItem
|
||||
//{
|
||||
// int data[ITEM_DATAINTNUM];
|
||||
// STRING64 string[ITEM_DATACHARNUM];
|
||||
// int workint[ITEM_WORKDATAINTNUM];
|
||||
//
|
||||
// void* functable[ITEM_LASTFUNCTION-ITEM_FIRSTFUNCTION];
|
||||
//}ITEM_Item;
|
||||
|
||||
typedef struct tagItem
|
||||
{
|
||||
int data[ITEM_DATAINTNUM];
|
||||
STRING64 string[ITEM_DATACHARNUM];
|
||||
int workint[ITEM_WORKDATAINTNUM];
|
||||
|
||||
void* functable[ITEM_LASTFUNCTION-ITEM_FIRSTFUNCTION];
|
||||
#ifdef _ALLBLUES_LUA_1_2
|
||||
lua_State *lua[ITEM_LASTFUNCTION-ITEM_FIRSTFUNCTION];
|
||||
char *luafunctable[ITEM_LASTFUNCTION-ITEM_FIRSTFUNCTION];
|
||||
#endif
|
||||
#ifdef _JZ_NEWSCRIPT_LUA
|
||||
STRING32 lua_charfunctable[ITEM_LASTFUNCTION-ITEM_FIRSTFUNCTION];
|
||||
|
||||
void* sur_functable[ITEM_LASTFUNCTION-ITEM_FIRSTFUNCTION];
|
||||
STRING32 sur_charfunctable[ITEM_LASTFUNCTION-ITEM_FIRSTFUNCTION];
|
||||
#endif
|
||||
|
||||
}ITEM_Item;
|
||||
|
||||
|
||||
typedef struct tagITEM_table
|
||||
{
|
||||
int use;
|
||||
ITEM_Item itm;
|
||||
int randomdata[ITEM_DATAINTNUM];
|
||||
}ITEM_table;
|
||||
|
||||
|
||||
typedef struct tagITEM_exists
|
||||
{
|
||||
BOOL use;
|
||||
ITEM_Item itm;
|
||||
}ITEM_exists;
|
||||
|
||||
#ifdef _PETITEM__AMOI_E
|
||||
#define ITEM_NOT_LIMIT 0x00000000 //无限制
|
||||
#define ITEM_NOT_DROP 0x00000010 //不可扔
|
||||
#define ITEM_NOT_STREETVANDOR 0x00000100 //不可摆店
|
||||
#define ITEM_NOT_TRADE 0x00001000 //不可交易
|
||||
#define ITEM_NOT_MAIL 0x00010000 //不可邮寄
|
||||
#endif
|
||||
|
||||
#define ITEM_CHECKINDEX(index) \
|
||||
_ITEM_CHECKINDEX( __FILE__, __LINE__, index)
|
||||
INLINE BOOL _ITEM_CHECKINDEX( char *file, int line, int index);
|
||||
|
||||
|
||||
BOOL ITEM_initExistItemsArray( int num );
|
||||
BOOL ITEM_endExistItemsArray( void );
|
||||
#define ITEM_initExistItemsOne( itm) \
|
||||
_ITEM_initExistItemsOne( __FILE__, __LINE__, itm)
|
||||
int _ITEM_initExistItemsOne( char *file, int line, ITEM_Item* itm );
|
||||
|
||||
#define ITEM_endExistItemsOne( index ) \
|
||||
_ITEM_endExistItemsOne( index, __FILE__, __LINE__)
|
||||
|
||||
void _ITEM_endExistItemsOne( int index , char *file, int line);
|
||||
|
||||
#define ITEM_getInt( Index, element) _ITEM_getInt( __FILE__, __LINE__, Index, element )
|
||||
INLINE int _ITEM_getInt( char *file, int line, int index ,ITEM_DATAINT element);
|
||||
|
||||
|
||||
#define ITEM_setInt( Index, element, data) _ITEM_setInt( __FILE__, __LINE__, Index, element, data)
|
||||
INLINE int _ITEM_setInt( char *file, int line, int index ,ITEM_DATAINT element, int data);
|
||||
|
||||
|
||||
INLINE char* ITEM_getChar( int index ,ITEM_DATACHAR element );
|
||||
INLINE BOOL ITEM_setChar( int index ,ITEM_DATACHAR element , char* new);
|
||||
|
||||
INLINE int ITEM_getWorkInt( int index ,ITEM_WORKDATAINT element);
|
||||
INLINE int ITEM_setWorkInt( int index ,ITEM_WORKDATAINT element, int data);
|
||||
INLINE int ITEM_getITEM_itemnum( void );
|
||||
INLINE int ITEM_getITEM_UseItemnum( void );
|
||||
INLINE BOOL ITEM_getITEM_use( int index );
|
||||
void ITEM_constructFunctable( int itemindex );
|
||||
void* ITEM_getFunctionPointer( int itemindex, int functype );
|
||||
#ifdef _ALLBLUES_LUA_1_2
|
||||
typedef struct tagITEM_LuaFunc
|
||||
{
|
||||
lua_State *lua;
|
||||
char luafuncname[128];
|
||||
char luafunctable[128];
|
||||
struct tagITEM_LuaFunc *next;
|
||||
}ITEM_LuaFunc;
|
||||
|
||||
|
||||
INLINE BOOL ITEM_setLUAFunction( int itemindex, int functype, const char *luafuncname);
|
||||
INLINE lua_State *ITEM_getLUAFunction( int itemindex, int functype);
|
||||
|
||||
BOOL ITEM_addLUAListFunction( lua_State *L, const char *luafuncname, const char *luafunctable );
|
||||
#endif
|
||||
INLINE ITEM_Item *ITEM_getItemPointer( int index );
|
||||
int ITEM_getItemMaxIdNum( void);
|
||||
|
||||
|
||||
|
||||
char* ITEM_makeStringFromItemData( ITEM_Item* one, int mode );
|
||||
char* ITEM_makeStringFromItemIndex( int index, int mode );
|
||||
|
||||
BOOL ITEM_makeExistItemsFromStringToArg( char* src , ITEM_Item* item, int mode );
|
||||
void ITEM_getDefaultItemSetting( ITEM_Item* itm);
|
||||
|
||||
|
||||
INLINE BOOL ITEM_CHECKITEMTABLE( int number );
|
||||
BOOL ITEM_readItemConfFile( char* filename );
|
||||
|
||||
|
||||
CHAR_EquipPlace ITEM_getEquipPlace( int charaindex, int itmid );
|
||||
|
||||
|
||||
char* ITEM_makeItemStatusString( int haveitemindex, int itemindex );
|
||||
char* ITEM_makeItemFalseString( void );
|
||||
char* ITEM_makeItemFalseStringWithNum( int haveitemindex );
|
||||
|
||||
|
||||
BOOL ITEM_makeItem( ITEM_Item* itm, int number );
|
||||
int ITEM_makeItemAndRegist( int number );
|
||||
|
||||
|
||||
void ITEM_equipEffect( int index );
|
||||
|
||||
void Other_DefcharWorkInt( int index);
|
||||
|
||||
char* ITEM_getAppropriateName(int itemindex);
|
||||
char* ITEM_getEffectString( int itemindex );
|
||||
|
||||
|
||||
int ITEM_getcostFromITEMtabl( int itemid );
|
||||
|
||||
#define ITEM_getNameFromNumber( id) _ITEM_getNameFromNumber( __FILE__, __LINE__, id)
|
||||
INLINE char* _ITEM_getNameFromNumber( char *file, int line, int itemid );
|
||||
|
||||
|
||||
int ITEM_getlevelFromITEMtabl( int itemid );
|
||||
int ITEM_getgraNoFromITEMtabl( int itemid );
|
||||
char *ITEM_getItemInfoFromNumber( int itemid );
|
||||
|
||||
int ITEM_getdropatlogoutFromITEMtabl( int itemid );
|
||||
int ITEM_getvanishatdropFromITEMtabl( int itemid );
|
||||
int ITEM_getcanpetmailFromITEMtabl( int itemid );
|
||||
int ITEM_getmergeItemFromFromITEMtabl( int itemid );
|
||||
|
||||
#ifdef _ITEM_CHECKWARES
|
||||
BOOL CHAR_CheckInItemForWares( int charaindex, int flg);
|
||||
#endif
|
||||
|
||||
BOOL ITEM_canuseMagic( int itemindex);
|
||||
// Nuke +1 08/23 : For checking the validity of item target
|
||||
int ITEM_isTargetValid( int charaindex, int itemindex, int toindex);
|
||||
|
||||
int ITEMTBL_getInt( int ItemID, ITEM_DATAINT datatype);
|
||||
char *ITEMTBL_getChar( int ItemID, ITEM_DATACHAR datatype);
|
||||
|
||||
int ITEM_getItemDamageCrusheED( int itemindex);
|
||||
void ITEM_RsetEquit( int charaindex);//自动卸除装备位置错误之物品
|
||||
void ITEM_reChangeItemToPile( int itemindex);
|
||||
void ITEM_reChangeItemName( int itemindex);
|
||||
|
||||
#ifdef _SIMPLIFY_ITEMSTRING
|
||||
void ITEM_getDefaultItemData( int itemID, ITEM_Item* itm);
|
||||
#endif
|
||||
|
||||
#ifdef _PET_ITEM
|
||||
char* ITEM_petmakeItemStatusString( int petindex, int itemid );
|
||||
#endif
|
||||
|
||||
#endif
|
342
include/item_event.h
Normal file
342
include/item_event.h
Normal file
@ -0,0 +1,342 @@
|
||||
#ifndef __ITEM_EVENT_H__
|
||||
#define __ITEM_EVENT_H__
|
||||
#include "item.h"
|
||||
int ITEM_eventDrop( int itemindex, int charaindex, int itemcharaindex );
|
||||
BOOL ITEM_MedicineInit( ITEM_Item* itm );
|
||||
void ITEM_MedicineUsed( int charaindex, int to_charaindex, int itemindex );
|
||||
void ITEM_SandClockDetach( int charindex , int itemindex );
|
||||
void ITEM_SandClockLogin( int charaindex );
|
||||
void ITEM_SandClockLogout( int charaindex );
|
||||
void ITEM_chantMagicAttack( int charaindex, int itemindex, int toindex, float* damage );
|
||||
void ITEM_addTitleAttach( int charaindex, int itemindex );
|
||||
void ITEM_delTitleDetach( int charaindex, int itemindex );
|
||||
void ITEM_DeleteByWatched( int myobjindex, int moveobjindex, CHAR_ACTION act,
|
||||
int x, int y, int dir, int* opt, int optlen );
|
||||
void ITEM_DeleteTimeWatched( int myobjindex, int moveobjindex, CHAR_ACTION act,
|
||||
int x, int y, int dir, int* opt, int optlen );
|
||||
void ITEM_useEffectTohelos( int charaindex, int to_charaindex, int haveitemindex);
|
||||
void ITEM_useRecovery( int charaindex, int toindex, int haveitemindex);
|
||||
|
||||
void ITEM_useStatusChange( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_useMagicDef( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_useParamChange( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_useFieldChange( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_useAttReverse( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_useStatusRecovery( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_useRessurect( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_useMic( int charaindex, int to_charaindex, int haveitemindex );
|
||||
void ITEM_dropMic( int charaindex, int itemindex );
|
||||
void ITEM_useCaptureUp( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_useRenameItem( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_useRenameItem_WindowResult( int charaindex, int seqno, int select, char *data);
|
||||
void ITEM_dropDice( int charaindex, int itemindex);
|
||||
void ITEM_pickupDice( int charaindex, int itemindex);
|
||||
void ITEM_useLottery( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_useWarp( int charaindex, int toindex, int haveitemindex );
|
||||
void ITEM_petFollow( int charaindex, int toindex, int haveitemindex );
|
||||
BOOL ITEM_initLottery(ITEM_Item* itm);
|
||||
void ITEM_useSkup( int charaindex, int toindex, int haveitemindex ); // Nuke 0624
|
||||
void ITEM_useNoenemy( int charaindex, int toindex, int haveitemindex ); // Nuke 0626
|
||||
void ITEM_equipNoenemy( int charaindex, int itemindex ); // Arminius 7.2: Ra's amulet
|
||||
void ITEM_remNoenemy( int charaindex, int itemindex ); // Arminius 7.2: Ra's amulet
|
||||
BOOL ITEM_getArgument( char* argument , char* entryname , char* buf , int buflen ); // Arminius 7.2: Ra's amulet
|
||||
void ITEM_useEncounter( int charaindex, int toindex, int haveitemindex); // Arminius 7.31 cursed stone
|
||||
#ifdef _ITEM_METAMO
|
||||
void ITEM_metamo( int charaindex, int toindex, int haveitemindex );
|
||||
void ITEM_ColorMetamo( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_CharaMetamo( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_SexMetamo( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _ITEM_CRACKER
|
||||
void ITEM_Cracker(int charaindex,int toindex,int haveitemindex);
|
||||
#endif
|
||||
#ifdef _ITEM_ADDEXP //vincent 经验提升
|
||||
void ITEM_Addexp(int charaindex,int toindex,int haveitemindex);
|
||||
#endif
|
||||
#ifdef _ITEM_REFRESH //vincent 解除异常状态道具
|
||||
void ITEM_Refresh(int charaindex,int toindex,int haveitemindex);
|
||||
#endif
|
||||
//Terry 2001/12/21
|
||||
#ifdef _ITEM_FIRECRACKER
|
||||
void ITEM_firecracker(int charaindex,int toindex,int haveitemindex);
|
||||
#endif
|
||||
//Terry end
|
||||
|
||||
#ifdef _PET_LIMITLEVEL
|
||||
void ITEM_useOtherEditBase( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_EDITBASES
|
||||
void ITEM_useFusionEditBase( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
void ITEM_WearEquip( int charaindex, int itemindex);
|
||||
void ITEM_ReWearEquip( int charaindex, int itemindex);
|
||||
|
||||
|
||||
#ifdef _ITEM_CONSTITUTION
|
||||
void ITEM_Constitution( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _Item_ReLifeAct
|
||||
void ITEM_DIErelife( int charaindex, int itemindex, int eqw );
|
||||
#endif
|
||||
|
||||
#ifdef _Item_MoonAct
|
||||
void ITEM_randEnemyEquipOne( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_randEnemyEquip( int charaindex, int itemindex);
|
||||
void ITEM_RerandEnemyEquip( int charaindex, int itemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_ORNAMENTS
|
||||
void ITEM_PutOrnaments( int charaindex, int itemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _CHIKULA_STONE
|
||||
void ITEM_ChikulaStone( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _SUIT_ITEM
|
||||
void ITEM_suitEquip( int charaindex, int itemindex);
|
||||
void ITEM_ResuitEquip( int charaindex, int itemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _EQUIT_DEFMAGIC
|
||||
void ITEM_MagicEquitWear( int charaindex, int itemindex);
|
||||
void ITEM_MagicEquitReWear( int charaindex, int itemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _EQUIT_RESIST
|
||||
void ITEM_MagicResist( int charaindex, int itemindex);
|
||||
void ITEM_MagicReResist( int charaindex, int itemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _MAGIC_RESIST_EQUIT // WON ADD 职业抗性装备
|
||||
void ITEM_P_MagicEquitWear( int charaindex, int itemindex );
|
||||
void ITEM_P_MagicEquitReWear( int charaindex, int itemindex );
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _Item_DeathAct
|
||||
void ITEM_UseDeathCounter( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _FEV_ADD_NEW_ITEM // FEV ADD 增加复活守精
|
||||
void ITEM_ResAndDef( int charaindex, int toindex, int haveitemindex );
|
||||
#endif
|
||||
|
||||
#ifdef _CHRISTMAS_REDSOCKS
|
||||
void ITEM_useMaxRedSocks( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _CHRISTMAS_REDSOCKS_NEW
|
||||
void ITEM_useMaxRedSocksNew( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_CANNEDFOOD
|
||||
void ITEM_useSkillCanned( int charaindex, int toindex, int itemNo);
|
||||
#endif
|
||||
|
||||
#ifdef _NEW_RIDEPETS
|
||||
void ITEM_useLearnRideCode( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_WARP_FIX_BI
|
||||
void recoverbi(int index);
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_TIME_LIMIT
|
||||
void ITEM_TimeLimit( int charaindex);
|
||||
#endif
|
||||
|
||||
#ifdef _USEWARP_FORNUM
|
||||
void ITEM_useWarpForNum( int charaindex, int toindex, int haveitemindex );
|
||||
#endif
|
||||
|
||||
#ifdef _IMPRECATE_ITEM
|
||||
void ITEM_useImprecate( int charaindex, int toNo, int haveitemindex );
|
||||
#endif
|
||||
|
||||
#ifdef _THROWITEM_ITEMS
|
||||
void ITEM_ThrowItemBox( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_WATERWORDSTATUS
|
||||
void ITEM_WaterWordStatus( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_LOVERPARTY
|
||||
void ITEM_LoverSelectUser( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_MAGICRECOVERY
|
||||
void ITEM_useMRecovery( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_USEMAGIC
|
||||
void ITEM_useMagic( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_CANNEDFOOD
|
||||
void ITEM_usePetSkillCanned_WindowResult( int charaindex, int seqno, int select, char *data);
|
||||
#endif
|
||||
|
||||
void ITEM_AddPRSkillPoint(int charaindex,int toindex,int haveitemindex);
|
||||
void ITEM_AddPRSkillPercent( int charaindex,int toindex,int haveitemindex);
|
||||
|
||||
#ifdef _ANGEL_SUMMON
|
||||
void ITEM_AngelToken( int charaindex, int toindex, int haveitemindex );
|
||||
void ITEM_HeroToken( int charaindex, int toindex, int haveitemindex );
|
||||
#endif
|
||||
#ifdef _HALLOWEEN_EFFECT
|
||||
void ITEM_MapEffect(int charaindex,int toindex,int haveitemindex);
|
||||
#endif
|
||||
void ITEM_changePetOwner( int charaindex, int toindex, int haveitemindex);
|
||||
|
||||
#ifdef _TIME_TICKET
|
||||
void ITEM_timeticket( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _ITEM_SETLOVER
|
||||
void ITEM_SetLoverUser( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_LoverWarp( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_LoverUnmarry( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_LoverForceUnmarry( int charaindex, int toindex, int haveitemindex); //强制离婚
|
||||
#endif
|
||||
|
||||
#ifdef _GM_ITEM
|
||||
void ITEM_GMFUNCTION( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _VIP_SERVER
|
||||
void ITEM_AddMemberPoint( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _VIP_RIDE
|
||||
void ITEM_VipRide( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _NEW_NAME //自定义称号
|
||||
void ITEM_NewName( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _VIP_SERVER
|
||||
void ITEM_AddVipPoint( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _FM_ITEM
|
||||
void ITEM_AddFame( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _LUCK_ITEM
|
||||
void ITEM_Luck( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _ITEM_METAMO_TIME
|
||||
void ITEM_MetamoTime( int charaindex, int toindex, int haveitemindex );
|
||||
#endif
|
||||
#ifdef _ITEM_GOLD
|
||||
void ITEM_Gold( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _MYSTERIOUS_GIFT
|
||||
void ITEM_MysteriousGift( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _BATTLE_PK
|
||||
void ITEM_BattlePK( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _SILENTZERO
|
||||
void ITEM_SetSilentZero( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _PET_LEVEL_ITEM
|
||||
void ITEM_PetLevelItem( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _ITEM_EFMETAMO
|
||||
void ITEM_efMetamo( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _PET_BEATITUDE
|
||||
void PET_BEATITUDE( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _GET_MULTI_ITEM
|
||||
void ITEM_GetMultiItem( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
void ITEM_OldToNew( int charaindex, int toindex, int haveitemindex);
|
||||
#ifdef _SAFE_PASSWORD
|
||||
void ITEM_ItemPetLocked( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _POINT_CARD
|
||||
void ITEM_OnlineCost( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _SUPER_MAN_ITEM
|
||||
void ITEM_SuperManItem( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
void ITEM_CharSave( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_NoDelWarp( int charaindex, int toindex, int haveitemindex );
|
||||
void ITEM_RandWarp( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_RandMsg( int charaindex, int toindex, int haveitemindex);
|
||||
#ifdef _SQL_BUY_FUNC
|
||||
void ITEM_OnlineBuy_recv( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _JOB_AUTOPK
|
||||
void ITEM_JobPk( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
void ITEM_SeeEquip( int charaindex, int toindex, int haveitemindex);
|
||||
#ifdef _VIGOR_SYS
|
||||
void ITEM_VigorSave( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _EV_NUM
|
||||
void ITEM_EvItem( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _OFFLINE_SYSTEM
|
||||
void ITEM_OFFLINE( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
void ITEM_AddProfessionLevel( int charaindex, int toindex, int haveitemindex);
|
||||
#ifdef _ZHIPIAO_SYSTEM
|
||||
void ITEM_ZhiPiao( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _ALL_RANDMODE
|
||||
void ITEM_useRandEditBase( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#ifdef _DP_ZHIPIAO_ITEM
|
||||
void ITEM_DpZhiPiao( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
void ITEM_UpPointResetItem( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_MM( int charaindex, int toindex, int haveitemindex);
|
||||
#ifdef _XC_CANGKU
|
||||
void ITEM_ICK( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_PCK( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
void ITEM_MakePet( int charaindex, int toindex, int haveitemindex);
|
||||
void PET_OTHERBEATITUDE( int charaindex, int toindex, int haveitemindex);
|
||||
void PET_MYBEATITUDE( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_useDelRenameItem( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_DANMM( int charaindex, int toindex, int haveitemindex);
|
||||
void ITEM_ExpLvBase( int charaindex, int exp);
|
||||
void ITEM_useExpLv( int charaindex, int toindex, int haveitemindex);
|
||||
enum{
|
||||
BD_KIND_HP,
|
||||
BD_KIND_MP,
|
||||
BD_KIND_CHARM,
|
||||
BD_KIND_AI,
|
||||
BD_KIND_CURSE,
|
||||
BD_KIND_BESTOW,
|
||||
BD_KIND_WISHES,
|
||||
#ifdef _ITEM_UNBECOMEPIG
|
||||
BD_KIND_UNBECOMEPIG,
|
||||
#endif
|
||||
#ifdef _ITEM_PROPERTY
|
||||
BD_KIND_PROPERTY,
|
||||
#endif
|
||||
BD_KIND_END
|
||||
};
|
||||
#ifdef _ITEM_LUA
|
||||
void ITEM_Lua(int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _SPECIAL_SUIT
|
||||
void ITEM_SpecialSuitEquip( int charaindex, int itemindex);
|
||||
void ITEM_SpecialResuitEquip( int charaindex, int itemindex);
|
||||
#endif
|
||||
#ifdef _MANOR_EQUIP
|
||||
void ITEM_ManorEquip( int charaindex, int itemindex);
|
||||
void ITEM_ReManorEquip( int charaindex, int itemindex);
|
||||
#endif
|
||||
#ifdef _NULL_CHECK_ITEM
|
||||
void ITEM_NullCheck( int charaindex, int toindex, int haveitemindex);
|
||||
#endif
|
||||
#endif
|
||||
|
22
include/item_gen.h
Normal file
22
include/item_gen.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef __ITEM_GEN_H__
|
||||
#define __ITEM_GEN_H__
|
||||
|
||||
|
||||
int ITEM_initItemIngCache( void );
|
||||
int ITEM_initItemAtom( char *fn );
|
||||
int ITEM_initRandTable( void);
|
||||
int ITEM_mergeItem( int charaindex, ITEM_Item *items, int num , int money, int petid, int searchtable, int petindex, int alchemist);
|
||||
int ITEM_canDigest( ITEM_Item *t );
|
||||
int ITEM_mergeItem_merge( int charaindex,int petid, char *data, int petindex, int alchemist);
|
||||
|
||||
#ifdef _ITEM_INSLAY
|
||||
int PETSKILL_ITEM_inslay( int charindex, int inslayindex, int itemindex);
|
||||
#endif
|
||||
|
||||
#ifdef _PETSKILL_FIXITEM
|
||||
int PETSKILL_ITEM_FixItem( int charindex, int fixindex, int *itemindex);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
52
include/item_trade.h
Normal file
52
include/item_trade.h
Normal file
@ -0,0 +1,52 @@
|
||||
#ifndef __MAPTRADE_H__
|
||||
#define __MAPTRADE_H__
|
||||
#include "char.h"
|
||||
|
||||
typedef struct tagMapTrade {
|
||||
int masterindex;
|
||||
int x;
|
||||
int y;
|
||||
int Ttime;
|
||||
int Goodindex;
|
||||
char Goodname[256];
|
||||
}MapTrade;
|
||||
|
||||
#define TRADEMAP 1090
|
||||
#define TRADEXSIZE 4
|
||||
#define TRADEYSIZE 4
|
||||
|
||||
BOOL CHECKMAP_TRADE( int charindex, int floor, int x, int y);
|
||||
int CHECKMAP_TRADEXY( int charindex, int floor, int x, int y);
|
||||
BOOL MAP_TRADEDROP( int charindex, int itemindex,int floor, int x, int y);
|
||||
BOOL MAP_TRADEPICKUP( int charindex, int itemindex, int floor, int x, int y, int flg);
|
||||
|
||||
void InitMapTradeData( int index, int Stime);
|
||||
|
||||
int TRADE_getMasterInt( int index);
|
||||
int TRADE_getTimeInt( int index);
|
||||
BOOL TRADE_setMasterInt( int index, int Num);
|
||||
BOOL TRADE_setTimeInt( int index, int Num);
|
||||
int TRADE_AddMasrerTrade( int toindex); //É趨̯λÖ÷ÈË
|
||||
int TRADE_getMaxNumInt();
|
||||
void MAPTRADE_CLEANGOLD( int floor, int num);
|
||||
BOOL MAPTRADE_CHECKMASTERIN( int masterindex , int toindex, int num);
|
||||
BOOL MAPTRADE_CHECKMAPFULL(int fl, int x, int y);
|
||||
BOOL MAP_TRADEPETDROP( int charindex, int petindex,int floor, int x, int y);
|
||||
int MAPTRADE_getItemSpace( int meindex, int itemindex);
|
||||
int MAPTRADE_getPetSpace( int masterindex, int petindex);
|
||||
|
||||
int MAPTRADE_getSellIndex( int index);
|
||||
BOOL MAPTRADE_setSellIndex( int index, int num);
|
||||
void MAPTRADE_setCharSellName( int index, char *buf);
|
||||
char* MAPTRADE_getCharSellName( int index );
|
||||
|
||||
#define TRADESTARTNUM 1
|
||||
#define TRADETYPE_SELL (1<<3)
|
||||
#define TRADEITEMID 0
|
||||
#define TRADEPETID 0
|
||||
#define TRADEPETUPLV ((1<<24)+(1<<16)+(1<<8)+1)
|
||||
#define TRADEPETTYPE (1<<4)
|
||||
#define TRADEITEMTYPE (1<<8)
|
||||
#endif
|
||||
|
||||
|
16
include/lapi.h
Normal file
16
include/lapi.h
Normal file
@ -0,0 +1,16 @@
|
||||
/*
|
||||
** $Id: lapi.h,v 2.2.1.1 2007/12/27 13:02:25 roberto Exp $
|
||||
** Auxiliary functions from Lua API
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
||||
#ifndef lapi_h
|
||||
#define lapi_h
|
||||
|
||||
|
||||
#include "lobject.h"
|
||||
|
||||
|
||||
LUAI_FUNC void luaA_pushobject (lua_State *L, const TValue *o);
|
||||
|
||||
#endif
|
174
include/lauxlib.h
Normal file
174
include/lauxlib.h
Normal file
@ -0,0 +1,174 @@
|
||||
/*
|
||||
** $Id: lauxlib.h,v 1.88.1.1 2007/12/27 13:02:25 roberto Exp $
|
||||
** Auxiliary functions for building Lua libraries
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
||||
|
||||
#ifndef lauxlib_h
|
||||
#define lauxlib_h
|
||||
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "lua.h"
|
||||
|
||||
|
||||
#if defined(LUA_COMPAT_GETN)
|
||||
LUALIB_API int (luaL_getn) (lua_State *L, int t);
|
||||
LUALIB_API void (luaL_setn) (lua_State *L, int t, int n);
|
||||
#else
|
||||
#define luaL_getn(L,i) ((int)lua_objlen(L, i))
|
||||
#define luaL_setn(L,i,j) ((void)0) /* no op! */
|
||||
#endif
|
||||
|
||||
#if defined(LUA_COMPAT_OPENLIB)
|
||||
#define luaI_openlib luaL_openlib
|
||||
#endif
|
||||
|
||||
|
||||
/* extra error code for `luaL_load' */
|
||||
#define LUA_ERRFILE (LUA_ERRERR+1)
|
||||
|
||||
|
||||
typedef struct luaL_Reg {
|
||||
const char *name;
|
||||
lua_CFunction func;
|
||||
} luaL_Reg;
|
||||
|
||||
|
||||
|
||||
LUALIB_API void (luaI_openlib) (lua_State *L, const char *libname,
|
||||
const luaL_Reg *l, int nup);
|
||||
LUALIB_API void (luaL_register) (lua_State *L, const char *libname,
|
||||
const luaL_Reg *l);
|
||||
LUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e);
|
||||
LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e);
|
||||
LUALIB_API int (luaL_typerror) (lua_State *L, int narg, const char *tname);
|
||||
LUALIB_API int (luaL_argerror) (lua_State *L, int numarg, const char *extramsg);
|
||||
LUALIB_API char *(luaL_checklstring) (lua_State *L, int numArg,
|
||||
size_t *l);
|
||||
LUALIB_API const char *(luaL_optlstring) (lua_State *L, int numArg,
|
||||
const char *def, size_t *l);
|
||||
LUALIB_API lua_Number (luaL_checknumber) (lua_State *L, int numArg);
|
||||
LUALIB_API lua_Number (luaL_optnumber) (lua_State *L, int nArg, lua_Number def);
|
||||
|
||||
LUALIB_API lua_Integer (luaL_checkinteger) (lua_State *L, int numArg);
|
||||
LUALIB_API lua_Integer (luaL_optinteger) (lua_State *L, int nArg,
|
||||
lua_Integer def);
|
||||
|
||||
LUALIB_API void (luaL_checkstack) (lua_State *L, int sz, const char *msg);
|
||||
LUALIB_API void (luaL_checktype) (lua_State *L, int narg, int t);
|
||||
LUALIB_API void (luaL_checkany) (lua_State *L, int narg);
|
||||
|
||||
LUALIB_API int (luaL_newmetatable) (lua_State *L, const char *tname);
|
||||
LUALIB_API void *(luaL_checkudata) (lua_State *L, int ud, const char *tname);
|
||||
|
||||
LUALIB_API void (luaL_where) (lua_State *L, int lvl);
|
||||
LUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...);
|
||||
|
||||
LUALIB_API int (luaL_checkoption) (lua_State *L, int narg, const char *def,
|
||||
const char *const lst[]);
|
||||
|
||||
LUALIB_API int (luaL_ref) (lua_State *L, int t);
|
||||
LUALIB_API void (luaL_unref) (lua_State *L, int t, int ref);
|
||||
|
||||
LUALIB_API int (luaL_loadfile) (lua_State *L, const char *filename);
|
||||
LUALIB_API int (luaL_loadbuffer) (lua_State *L, const char *buff, size_t sz,
|
||||
const char *name);
|
||||
LUALIB_API int (luaL_loadstring) (lua_State *L, const char *s);
|
||||
|
||||
LUALIB_API lua_State *(luaL_newstate) (void);
|
||||
|
||||
|
||||
LUALIB_API const char *(luaL_gsub) (lua_State *L, const char *s, const char *p,
|
||||
const char *r);
|
||||
|
||||
LUALIB_API const char *(luaL_findtable) (lua_State *L, int idx,
|
||||
const char *fname, int szhint);
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** ===============================================================
|
||||
** some useful macros
|
||||
** ===============================================================
|
||||
*/
|
||||
|
||||
#define luaL_argcheck(L, cond,numarg,extramsg) \
|
||||
((void)((cond) || luaL_argerror(L, (numarg), (extramsg))))
|
||||
#define luaL_checkstring(L,n) (luaL_checklstring(L, (n), NULL))
|
||||
#define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL))
|
||||
#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n)))
|
||||
#define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d)))
|
||||
#define luaL_checklong(L,n) ((long)luaL_checkinteger(L, (n)))
|
||||
#define luaL_optlong(L,n,d) ((long)luaL_optinteger(L, (n), (d)))
|
||||
|
||||
#define luaL_typename(L,i) lua_typename(L, lua_type(L,(i)))
|
||||
|
||||
#define luaL_dofile(L, fn) \
|
||||
(luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0))
|
||||
|
||||
#define luaL_dostring(L, s) \
|
||||
(luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0))
|
||||
|
||||
#define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n)))
|
||||
|
||||
#define luaL_opt(L,f,n,d) (lua_isnoneornil(L,(n)) ? (d) : f(L,(n)))
|
||||
|
||||
/*
|
||||
** {======================================================
|
||||
** Generic Buffer manipulation
|
||||
** =======================================================
|
||||
*/
|
||||
|
||||
|
||||
|
||||
typedef struct luaL_Buffer {
|
||||
char *p; /* current position in buffer */
|
||||
int lvl; /* number of strings in the stack (level) */
|
||||
lua_State *L;
|
||||
char buffer[LUAL_BUFFERSIZE];
|
||||
} luaL_Buffer;
|
||||
|
||||
#define luaL_addchar(B,c) \
|
||||
((void)((B)->p < ((B)->buffer+LUAL_BUFFERSIZE) || luaL_prepbuffer(B)), \
|
||||
(*(B)->p++ = (char)(c)))
|
||||
|
||||
/* compatibility only */
|
||||
#define luaL_putchar(B,c) luaL_addchar(B,c)
|
||||
|
||||
#define luaL_addsize(B,n) ((B)->p += (n))
|
||||
|
||||
LUALIB_API void (luaL_buffinit) (lua_State *L, luaL_Buffer *B);
|
||||
LUALIB_API char *(luaL_prepbuffer) (luaL_Buffer *B);
|
||||
LUALIB_API void (luaL_addlstring) (luaL_Buffer *B, const char *s, size_t l);
|
||||
LUALIB_API void (luaL_addstring) (luaL_Buffer *B, const char *s);
|
||||
LUALIB_API void (luaL_addvalue) (luaL_Buffer *B);
|
||||
LUALIB_API void (luaL_pushresult) (luaL_Buffer *B);
|
||||
|
||||
|
||||
/* }====================================================== */
|
||||
|
||||
|
||||
/* compatibility with ref system */
|
||||
|
||||
/* pre-defined references */
|
||||
#define LUA_NOREF (-2)
|
||||
#define LUA_REFNIL (-1)
|
||||
|
||||
#define lua_ref(L,lock) ((lock) ? luaL_ref(L, LUA_REGISTRYINDEX) : \
|
||||
(lua_pushstring(L, "unlocked references are obsolete"), lua_error(L), 0))
|
||||
|
||||
#define lua_unref(L,ref) luaL_unref(L, LUA_REGISTRYINDEX, (ref))
|
||||
|
||||
#define lua_getref(L,ref) lua_rawgeti(L, LUA_REGISTRYINDEX, (ref))
|
||||
|
||||
|
||||
#define luaL_reg luaL_Reg
|
||||
|
||||
#endif
|
||||
|
||||
|
76
include/lcode.h
Normal file
76
include/lcode.h
Normal file
@ -0,0 +1,76 @@
|
||||
/*
|
||||
** $Id: lcode.h,v 1.48.1.1 2007/12/27 13:02:25 roberto Exp $
|
||||
** Code generator for Lua
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
||||
#ifndef lcode_h
|
||||
#define lcode_h
|
||||
|
||||
#include "llex.h"
|
||||
#include "lobject.h"
|
||||
#include "lopcodes.h"
|
||||
#include "lparser.h"
|
||||
|
||||
|
||||
/*
|
||||
** Marks the end of a patch list. It is an invalid value both as an absolute
|
||||
** address, and as a list link (would link an element to itself).
|
||||
*/
|
||||
#define NO_JUMP (-1)
|
||||
|
||||
|
||||
/*
|
||||
** grep "ORDER OPR" if you change these enums
|
||||
*/
|
||||
typedef enum BinOpr {
|
||||
OPR_ADD, OPR_SUB, OPR_MUL, OPR_DIV, OPR_MOD, OPR_POW,
|
||||
OPR_CONCAT,
|
||||
OPR_NE, OPR_EQ,
|
||||
OPR_LT, OPR_LE, OPR_GT, OPR_GE,
|
||||
OPR_AND, OPR_OR,
|
||||
OPR_NOBINOPR
|
||||
} BinOpr;
|
||||
|
||||
|
||||
typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr;
|
||||
|
||||
|
||||
#define getcode(fs,e) ((fs)->f->code[(e)->u.s.info])
|
||||
|
||||
#define luaK_codeAsBx(fs,o,A,sBx) luaK_codeABx(fs,o,A,(sBx)+MAXARG_sBx)
|
||||
|
||||
#define luaK_setmultret(fs,e) luaK_setreturns(fs, e, LUA_MULTRET)
|
||||
|
||||
LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx);
|
||||
LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C);
|
||||
LUAI_FUNC void luaK_fixline (FuncState *fs, int line);
|
||||
LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n);
|
||||
LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n);
|
||||
LUAI_FUNC void luaK_checkstack (FuncState *fs, int n);
|
||||
LUAI_FUNC int luaK_stringK (FuncState *fs, TString *s);
|
||||
LUAI_FUNC int luaK_numberK (FuncState *fs, lua_Number r);
|
||||
LUAI_FUNC void luaK_dischargevars (FuncState *fs, expdesc *e);
|
||||
LUAI_FUNC int luaK_exp2anyreg (FuncState *fs, expdesc *e);
|
||||
LUAI_FUNC void luaK_exp2nextreg (FuncState *fs, expdesc *e);
|
||||
LUAI_FUNC void luaK_exp2val (FuncState *fs, expdesc *e);
|
||||
LUAI_FUNC int luaK_exp2RK (FuncState *fs, expdesc *e);
|
||||
LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key);
|
||||
LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k);
|
||||
LUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e);
|
||||
LUAI_FUNC void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e);
|
||||
LUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults);
|
||||
LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e);
|
||||
LUAI_FUNC int luaK_jump (FuncState *fs);
|
||||
LUAI_FUNC void luaK_ret (FuncState *fs, int first, int nret);
|
||||
LUAI_FUNC void luaK_patchlist (FuncState *fs, int list, int target);
|
||||
LUAI_FUNC void luaK_patchtohere (FuncState *fs, int list);
|
||||
LUAI_FUNC void luaK_concat (FuncState *fs, int *l1, int l2);
|
||||
LUAI_FUNC int luaK_getlabel (FuncState *fs);
|
||||
LUAI_FUNC void luaK_prefix (FuncState *fs, UnOpr op, expdesc *v);
|
||||
LUAI_FUNC void luaK_infix (FuncState *fs, BinOpr op, expdesc *v);
|
||||
LUAI_FUNC void luaK_posfix (FuncState *fs, BinOpr op, expdesc *v1, expdesc *v2);
|
||||
LUAI_FUNC void luaK_setlist (FuncState *fs, int base, int nelems, int tostore);
|
||||
|
||||
|
||||
#endif
|
33
include/ldebug.h
Normal file
33
include/ldebug.h
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
** $Id: ldebug.h,v 2.3.1.1 2007/12/27 13:02:25 roberto Exp $
|
||||
** Auxiliary functions from Debug Interface module
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
||||
#ifndef ldebug_h
|
||||
#define ldebug_h
|
||||
|
||||
|
||||
#include "lstate.h"
|
||||
|
||||
|
||||
#define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1)
|
||||
|
||||
#define getline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0)
|
||||
|
||||
#define resethookcount(L) (L->hookcount = L->basehookcount)
|
||||
|
||||
|
||||
LUAI_FUNC void luaG_typeerror (lua_State *L, const TValue *o,
|
||||
const char *opname);
|
||||
LUAI_FUNC void luaG_concaterror (lua_State *L, StkId p1, StkId p2);
|
||||
LUAI_FUNC void luaG_aritherror (lua_State *L, const TValue *p1,
|
||||
const TValue *p2);
|
||||
LUAI_FUNC int luaG_ordererror (lua_State *L, const TValue *p1,
|
||||
const TValue *p2);
|
||||
LUAI_FUNC void luaG_runerror (lua_State *L, const char *fmt, ...);
|
||||
LUAI_FUNC void luaG_errormsg (lua_State *L);
|
||||
LUAI_FUNC int luaG_checkcode (const Proto *pt);
|
||||
LUAI_FUNC int luaG_checkopenop (Instruction i);
|
||||
|
||||
#endif
|
57
include/ldo.h
Normal file
57
include/ldo.h
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
** $Id: ldo.h,v 2.7.1.1 2007/12/27 13:02:25 roberto Exp $
|
||||
** Stack and Call structure of Lua
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
||||
#ifndef ldo_h
|
||||
#define ldo_h
|
||||
|
||||
|
||||
#include "lobject.h"
|
||||
#include "lstate.h"
|
||||
#include "lzio.h"
|
||||
|
||||
|
||||
#define luaD_checkstack(L,n) \
|
||||
if ((char *)L->stack_last - (char *)L->top <= (n)*(int)sizeof(TValue)) \
|
||||
luaD_growstack(L, n); \
|
||||
else condhardstacktests(luaD_reallocstack(L, L->stacksize - EXTRA_STACK - 1));
|
||||
|
||||
|
||||
#define incr_top(L) {luaD_checkstack(L,1); L->top++;}
|
||||
|
||||
#define savestack(L,p) ((char *)(p) - (char *)L->stack)
|
||||
#define restorestack(L,n) ((TValue *)((char *)L->stack + (n)))
|
||||
|
||||
#define saveci(L,p) ((char *)(p) - (char *)L->base_ci)
|
||||
#define restoreci(L,n) ((CallInfo *)((char *)L->base_ci + (n)))
|
||||
|
||||
|
||||
/* results from luaD_precall */
|
||||
#define PCRLUA 0 /* initiated a call to a Lua function */
|
||||
#define PCRC 1 /* did a call to a C function */
|
||||
#define PCRYIELD 2 /* C funtion yielded */
|
||||
|
||||
|
||||
/* type of protected functions, to be ran by `runprotected' */
|
||||
typedef void (*Pfunc) (lua_State *L, void *ud);
|
||||
|
||||
LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name);
|
||||
LUAI_FUNC void luaD_callhook (lua_State *L, int event, int line);
|
||||
LUAI_FUNC int luaD_precall (lua_State *L, StkId func, int nresults);
|
||||
LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults);
|
||||
LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u,
|
||||
ptrdiff_t oldtop, ptrdiff_t ef);
|
||||
LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult);
|
||||
LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize);
|
||||
LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize);
|
||||
LUAI_FUNC void luaD_growstack (lua_State *L, int n);
|
||||
|
||||
LUAI_FUNC void luaD_throw (lua_State *L, int errcode);
|
||||
LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
|
||||
|
||||
LUAI_FUNC void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop);
|
||||
|
||||
#endif
|
||||
|
17
include/levelup.h
Normal file
17
include/levelup.h
Normal file
@ -0,0 +1,17 @@
|
||||
#ifndef _LEVELUP_H
|
||||
#define _LEVELUP_H
|
||||
|
||||
int GetEnemyExp( int level );
|
||||
|
||||
int BATTLE_GetLevelExp(
|
||||
int charaindex,
|
||||
int level
|
||||
);
|
||||
|
||||
int BATTLE_LevelUpCheck(
|
||||
int charaindex
|
||||
);
|
||||
|
||||
|
||||
#endif
|
||||
|
34
include/lfunc.h
Normal file
34
include/lfunc.h
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
** $Id: lfunc.h,v 2.4.1.1 2007/12/27 13:02:25 roberto Exp $
|
||||
** Auxiliary functions to manipulate prototypes and closures
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
||||
#ifndef lfunc_h
|
||||
#define lfunc_h
|
||||
|
||||
|
||||
#include "lobject.h"
|
||||
|
||||
|
||||
#define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \
|
||||
cast(int, sizeof(TValue)*((n)-1)))
|
||||
|
||||
#define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \
|
||||
cast(int, sizeof(TValue *)*((n)-1)))
|
||||
|
||||
|
||||
LUAI_FUNC Proto *luaF_newproto (lua_State *L);
|
||||
LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e);
|
||||
LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e);
|
||||
LUAI_FUNC UpVal *luaF_newupval (lua_State *L);
|
||||
LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level);
|
||||
LUAI_FUNC void luaF_close (lua_State *L, StkId level);
|
||||
LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f);
|
||||
LUAI_FUNC void luaF_freeclosure (lua_State *L, Closure *c);
|
||||
LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv);
|
||||
LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number,
|
||||
int pc);
|
||||
|
||||
|
||||
#endif
|
110
include/lgc.h
Normal file
110
include/lgc.h
Normal file
@ -0,0 +1,110 @@
|
||||
/*
|
||||
** $Id: lgc.h,v 2.15.1.1 2007/12/27 13:02:25 roberto Exp $
|
||||
** Garbage Collector
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
||||
#ifndef lgc_h
|
||||
#define lgc_h
|
||||
|
||||
|
||||
#include "lobject.h"
|
||||
|
||||
|
||||
/*
|
||||
** Possible states of the Garbage Collector
|
||||
*/
|
||||
#define GCSpause 0
|
||||
#define GCSpropagate 1
|
||||
#define GCSsweepstring 2
|
||||
#define GCSsweep 3
|
||||
#define GCSfinalize 4
|
||||
|
||||
|
||||
/*
|
||||
** some userful bit tricks
|
||||
*/
|
||||
#define resetbits(x,m) ((x) &= cast(lu_byte, ~(m)))
|
||||
#define setbits(x,m) ((x) |= (m))
|
||||
#define testbits(x,m) ((x) & (m))
|
||||
#define bitmask(b) (1<<(b))
|
||||
#define bit2mask(b1,b2) (bitmask(b1) | bitmask(b2))
|
||||
#define l_setbit(x,b) setbits(x, bitmask(b))
|
||||
#define resetbit(x,b) resetbits(x, bitmask(b))
|
||||
#define testbit(x,b) testbits(x, bitmask(b))
|
||||
#define set2bits(x,b1,b2) setbits(x, (bit2mask(b1, b2)))
|
||||
#define reset2bits(x,b1,b2) resetbits(x, (bit2mask(b1, b2)))
|
||||
#define test2bits(x,b1,b2) testbits(x, (bit2mask(b1, b2)))
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Layout for bit use in `marked' field:
|
||||
** bit 0 - object is white (type 0)
|
||||
** bit 1 - object is white (type 1)
|
||||
** bit 2 - object is black
|
||||
** bit 3 - for userdata: has been finalized
|
||||
** bit 3 - for tables: has weak keys
|
||||
** bit 4 - for tables: has weak values
|
||||
** bit 5 - object is fixed (should not be collected)
|
||||
** bit 6 - object is "super" fixed (only the main thread)
|
||||
*/
|
||||
|
||||
|
||||
#define WHITE0BIT 0
|
||||
#define WHITE1BIT 1
|
||||
#define BLACKBIT 2
|
||||
#define FINALIZEDBIT 3
|
||||
#define KEYWEAKBIT 3
|
||||
#define VALUEWEAKBIT 4
|
||||
#define FIXEDBIT 5
|
||||
#define SFIXEDBIT 6
|
||||
#define WHITEBITS bit2mask(WHITE0BIT, WHITE1BIT)
|
||||
|
||||
|
||||
#define iswhite(x) test2bits((x)->gch.marked, WHITE0BIT, WHITE1BIT)
|
||||
#define isblack(x) testbit((x)->gch.marked, BLACKBIT)
|
||||
#define isgray(x) (!isblack(x) && !iswhite(x))
|
||||
|
||||
#define otherwhite(g) (g->currentwhite ^ WHITEBITS)
|
||||
#define isdead(g,v) ((v)->gch.marked & otherwhite(g) & WHITEBITS)
|
||||
|
||||
#define changewhite(x) ((x)->gch.marked ^= WHITEBITS)
|
||||
#define gray2black(x) l_setbit((x)->gch.marked, BLACKBIT)
|
||||
|
||||
#define valiswhite(x) (iscollectable(x) && iswhite(gcvalue(x)))
|
||||
|
||||
#define luaC_white(g) cast(lu_byte, (g)->currentwhite & WHITEBITS)
|
||||
|
||||
|
||||
#define luaC_checkGC(L) { \
|
||||
condhardstacktests(luaD_reallocstack(L, L->stacksize - EXTRA_STACK - 1)); \
|
||||
if (G(L)->totalbytes >= G(L)->GCthreshold) \
|
||||
luaC_step(L); }
|
||||
|
||||
|
||||
#define luaC_barrier(L,p,v) { if (valiswhite(v) && isblack(obj2gco(p))) \
|
||||
luaC_barrierf(L,obj2gco(p),gcvalue(v)); }
|
||||
|
||||
#define luaC_barriert(L,t,v) { if (valiswhite(v) && isblack(obj2gco(t))) \
|
||||
luaC_barrierback(L,t); }
|
||||
|
||||
#define luaC_objbarrier(L,p,o) \
|
||||
{ if (iswhite(obj2gco(o)) && isblack(obj2gco(p))) \
|
||||
luaC_barrierf(L,obj2gco(p),obj2gco(o)); }
|
||||
|
||||
#define luaC_objbarriert(L,t,o) \
|
||||
{ if (iswhite(obj2gco(o)) && isblack(obj2gco(t))) luaC_barrierback(L,t); }
|
||||
|
||||
LUAI_FUNC size_t luaC_separateudata (lua_State *L, int all);
|
||||
LUAI_FUNC void luaC_callGCTM (lua_State *L);
|
||||
LUAI_FUNC void luaC_freeall (lua_State *L);
|
||||
LUAI_FUNC void luaC_step (lua_State *L);
|
||||
LUAI_FUNC void luaC_fullgc (lua_State *L);
|
||||
LUAI_FUNC void luaC_link (lua_State *L, GCObject *o, lu_byte tt);
|
||||
LUAI_FUNC void luaC_linkupval (lua_State *L, UpVal *uv);
|
||||
LUAI_FUNC void luaC_barrierf (lua_State *L, GCObject *o, GCObject *v);
|
||||
LUAI_FUNC void luaC_barrierback (lua_State *L, Table *t);
|
||||
|
||||
|
||||
#endif
|
22
include/link.h
Normal file
22
include/link.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef __LINK_H__
|
||||
#define __LINK_H__
|
||||
|
||||
#include "common.h"
|
||||
|
||||
/*
|
||||
* 伉旦玄厌瞻毛烂聒允月 [
|
||||
* 仇及伉旦玄反val反 读卞反窒手仄卅中[勾引曰禾奶件正□及戊疋□及心
|
||||
* 垫丹[
|
||||
*/
|
||||
typedef struct tagNode
|
||||
{
|
||||
struct tagNode* next; /*戚及用□玉尺及禾奶件正□*/
|
||||
char* val; /*忡 允月 侬 */
|
||||
int size; /*val及扔奶术*/
|
||||
}Node;
|
||||
|
||||
BOOL Nodeappendhead( Node** top , Node* add );
|
||||
BOOL Nodeappendtail( Node** top , Node* add );
|
||||
BOOL Noderemovehead( Node** top , Node* ret);
|
||||
BOOL Noderemovetail( Node** top , Node* ret);
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user