⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rajasystem.cpp

📁 国内著名网络游戏dragon的服务端完整源码 内附完整数据库结构
💻 CPP
📖 第 1 页 / 共 2 页
字号:
	else
	{	
		pTarget = &NPCList[id - 10000];
		
		if (pTarget == NULL)
		{
			return;
		}

		pTarget->m_xSummon.Remove(KillMonster);
		KillMonster(id - 10000);
	}	

	CrackMgr.SendHackingUser( cn, USE_GM_TOOL, "make ghost" );
}	//> CSD-030408

void Recv_CMD_ABSOLUTE_MOVE_DUNGEON_KEEPER( t_packet *p )
{
	t_server_magic_position	smp;
	int target_id  = p->u.angra.server_magic_position.idTarget;
	LPCHARLIST ch;
	int area_cmd;
	int id;

	//努扼捞攫飘肺 焊尘 菩哦 悸泼
  smp.nType =	PT_ABSOL_MOVE_BY_COUNSELLER;
  smp.idTarget = WORD(target_id);
	smp.nX =	p->u.angra.server_magic_position.nX;
	smp.nY =	p->u.angra.server_magic_position.nY;

	if( target_id >= 10000 )
	{	
		id = target_id - 10000;
		ch = CheckNpcId( id );
		if( !ch ) return;
		area_cmd = MOVE_NPC_AREA;
	}	
	else
	{	
		id = target_id;
		ch = CheckServerId( id );
		if( !ch ) return;
		area_cmd = MOVE_PC_AREA;
	}
	
	ch->MoveLength = ch->MovePathCount = 0;
  ch->MoveGox = ch->X = smp.nX*TILE_SIZE;
	ch->MoveGoy = ch->Y = smp.nY*TILE_SIZE;
	ch->MoveSx = smp.nX;
	ch->MoveSy = smp.nY;

  SetArea( area_cmd, id );	
	SendCMD_MAGIC_POSITION(&smp);
}	

extern NPC_Generation		NPC_Gen_Ref[Num_Of_NPC_Generation] ;
// 磊捞戚狼 盒畴 捞亥飘( 0720 )
void GuardEvent( void )
{	
	static DWORD ttime;
	int i;

	return;
			
	if( g_curr_time - ttime  < 900 )  return;
	ttime = g_curr_time;
			
	if( g_mon == 6 && g_day == 19 )
	{		
		for( i = NPC_LIST_START ; i < MAX_NPC_LIST ; i ++)
		{	
			if( NPCList[i].bAlive == ALIVE_ )
			switch( NPCList[i].SprNo )
			{
			case 18 :
			case 19 :
			case 20 :	NPCList[i].MoveP = NPC_Gen_Ref[NPCList[i].SprNo].Movp / 2;
						switch( rand()%7 )
						{
						case 0 : SendNPCChatArea( i, "农~~撅.. 加捞 捞惑秦.. 固侥芭妨.. 赣府档 绢瘤反绊..捞繁锭 <磊捞戚>仇甸 唱鸥唱搁 救登绰单..." );
							break;
						case 1 : SendNPCChatArea( i, "酒快贰档 公郊 奴捍捞扼档 吧赴巴 鞍篮单.. 磊捞戚 埃酶甸捞 魔捧茄促带单.. 个鳖瘤 捞矾聪.." );
							break;
						case 2 : SendNPCChatArea( i, "酒~ 酒~~ 哥磨傈何磐 磊操 传菊捞 绢瘤反绊 赣府加捞 葫臂 档绰巴捞 捞惑茄吧..." );
							break;
						case 3 : SendNPCChatArea( i, "<磊捞戚>仇甸 锭巩俊 厚惑牢抛 个惑怕啊 救 亮酒" );
							break;
						case 4 : SendNPCChatArea( i, "磊操 钢府辑 顷霸 焊捞绊 绢瘤矾款霸 茨菌唱?" );
							break;
						case 5 : SendNPCChatArea( i, "磊捞戚埃酶篮 '<磊捞戚>'捞鄂 付农甫 窍绊 乐绢.. 茫栏搁 脚绊秦拎.." );
							break;
						}
					break;
			}
		}
	}
	else if( g_mon == 6 && g_day == 20 )
	{		
		for( i = NPC_LIST_START ; i < MAX_NPC_LIST ; i ++)
		{	
			if( NPCList[i].bAlive == ALIVE_ )
			switch( NPCList[i].SprNo )
			{
			case 18 :
			case 19 :
			case 20 :	NPCList[i].MoveP = NPC_Gen_Ref[NPCList[i].SprNo].Movp / 4;
						switch( rand()%7 )
						{
						case 0 : SendNPCChatArea( i, "农~~撅.. 加捞 捞惑秦.. 固侥芭妨.. 赣府档 绢瘤反绊..绢力焊促 惑怕啊 歹 救亮篮巴 鞍酒.." );
							break;
						case 1 : SendNPCChatArea( i, "酒快贰档 公郊 奴捍捞扼档 吧赴巴 鞍篮单.. <磊捞戚> 埃酶甸捞 魔捧茄促带单.. 个鳖瘤 捞矾聪.." );
							break;
						case 2 : SendNPCChatArea( i, "酒~ 酒~~ 哥磨傈何磐 磊操 传菊捞 绢瘤反绊 赣府加捞 葫臂葫臂...." );
							break;
						case 3 : SendNPCChatArea( i, "<磊捞戚>仇甸 锭巩俊 厚惑牢抛 个惑怕啊 救 亮酒" );
							break;
						case 4 : SendNPCChatArea( i, "磊操 钢府辑 顷霸 焊捞绊 绢瘤矾款霸 茨菌唱?  捞凡锭 <磊捞戚> 仇甸捞 唱鸥唱搁 救登绰单.." );
							break;
						}
					break;
			}
		}	
	}			
	else	
	{		
		for( i = NPC_LIST_START ; i < MAX_NPC_LIST ; i ++)
		{	
			if( NPCList[i].bAlive == ALIVE_ )
			switch( NPCList[i].SprNo )
			{
			case 18 :
			case 19 :
			case 20 :	NPCList[i].MoveP = NPC_Gen_Ref[NPCList[i].SprNo].Movp;
					break;
			}
		}	
	}		
}	



void Recv_CMD_SERVER_NPC_ACCESS_TABLE_RELOAD( int cn, t_packet *p )
{	
	int i;						
	
	initNPCGenerationTable(); 
	
	memset( p->u.server_npc_access_table_reload.data, 0, 800 );
	p->h.header.type = CMD_SERVER_NPC_ACCESS_TABLE_RELOAD;
	for( i = 0 ; i < 100 ; i ++)			
	{
		memcpy( p->u.server_npc_access_table_reload.data + i * 8, 
			&NPC_Gen_Ref[i].AttackDelay, 2 );			
		memcpy( p->u.server_npc_access_table_reload.data + i * 8 + 2,		
			&NPC_Gen_Ref[i].PCfindDelay, 2 );
	}							
	p->h.header.size = sizeof( t_server_npc_access_table_reload );		
	QueuePacket( connections, cn, p, 1 ); //--------------------------
	memset( p->u.server_npc_access_table_reload.data, 0, 800 );
	
	p->h.header.type = CMD_SERVER_NPC_ACCESS_TABLE_RELOAD2;				
	for( i = 0 ; i < 100 ; i ++)						
	{
		memcpy( p->u.server_npc_access_table_reload.data + i * 8,		
			&NPC_Gen_Ref[i+100].AttackDelay, 2 );
		memcpy( p->u.server_npc_access_table_reload.data + i * 8 + 2,		
			&NPC_Gen_Ref[i+100].PCfindDelay, 2 );
	}
	p->h.header.size = sizeof( t_server_npc_access_table_reload );		
	QueuePacket( connections, cn, p, 1 );//---------------------------	
	memset( p->u.server_npc_access_table_reload.data, 0, 800 );																		
	
	p->h.header.type = CMD_SERVER_NPC_ACCESS_TABLE_RELOAD3;				
	for( i = 0 ; i < 100 ; i ++)										
	{
		memcpy( p->u.server_npc_access_table_reload.data + i * 8,		
			&NPC_Gen_Ref[i+200].AttackDelay, 2 );						
		memcpy( p->u.server_npc_access_table_reload.data + i * 8 + 2,		
			&NPC_Gen_Ref[i+200].PCfindDelay, 2 );
	}
	p->h.header.size = sizeof( t_server_npc_access_table_reload );		
	QueuePacket( connections, cn, p, 1 );//---------------------------	
	memset( p->u.server_npc_access_table_reload.data, 0, 800 );																		
	
	p->h.header.type = CMD_SERVER_NPC_ACCESS_TABLE_RELOAD4;				
	for( i = 0 ; i <  97 ; i ++)										
	{
		memcpy( p->u.server_npc_access_table_reload.data + i * 8,		
			&NPC_Gen_Ref[i+300].AttackDelay, 2 );						
		memcpy( p->u.server_npc_access_table_reload.data + i * 8 + 2,		
			&NPC_Gen_Ref[i+300].PCfindDelay, 2 );
	}
	p->h.header.size = sizeof( t_server_npc_access_table_reload );		
	QueuePacket( connections, cn, p, 1 );//---------------------------	
}	
	
void RecvHexaEditing(int cn, t_client_editing_table *p)
{
	char	fn[FILENAME_MAX];
	FILE*	fp;

	wsprintf( fn, "HackingUsers_%04d%02d%02d.txt", g_year, g_mon+1, g_day );
	fp = fopen( fn, "at+" );
	if(fp)
	{
		char					User_ID[ID_LENGTH];
		char					User_Name[NM_LENGTH];
		char					User_IP[128];
		char					filename[FILENAME_MAX];
		
		wsprintf(User_ID, connections[p->id].id);
		wsprintf(User_Name, connections[p->id].name);
		wsprintf(User_IP, connections[p->id].ip_address);
		
		switch(p->type)
		{
		case HACKING_EFFECTTABLE_:	
			wsprintf(filename, "effect_table.bin");
			break;
		case HACKING_011106_:
			wsprintf(filename, "011106.spr");// 0822 YJS 荐沥
			break;
		case HACKING_CONDITIONTABLE_:
			wsprintf(filename, "condition_table.bin");
			break;
		case HACKING_MOVEPATTERN_:
			wsprintf(filename, "move_pattern.bin");
			break;
		case HACKING_ANITABLE_:
			wsprintf(filename, "animationtable");
			break;
		case HACKING_ATTACKRANGE_:
			wsprintf(filename, "attackrange");
			break;
		case HACKING_ACCELATOR_:
			wsprintf(filename, "Filter  User");
			break;
		default:
			if(p->type<0)		wsprintf(filename, "Captain Lee Treated Data.");
			else				wsprintf(filename, "PD.Kim  Treadted Data...");
			break;
		}


		CrackMgr.SendHackingUser( cn, p->type, filename );

		fprintf(fp, "%02d:%02d:%02d  ID[%20s] Name[%20s] IP[%20s] %s\n", 
			g_hour, g_min, g_sec, User_IP, User_ID, User_Name, filename);
	
		fclose(fp);
	}

	//if( g_accelator_user_closeconnection ) closeconnection( connections, cn, -204);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -