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

📄 effect.cpp

📁 网络游戏龙族 完整的登陆器 C++ 源代码
💻 CPP
📖 第 1 页 / 共 5 页
字号:
	
	while( target!=NULL )
	{
		if( BoxAndDotCrash(lpChar->x - TILE_SIZE*tile,lpChar->y - TILE_SIZE*tile, TILE_SIZE*tile*2, TILE_SIZE*tile*2, target->x, target->y) )
			return 1;
		else	target = target->lpNext;
	}
	return 0;	
}

LPITEMGROUND ReturnMagicCheckedItem( bool range_Check, MAGICLIST* lpML, int x, int y, int fire_Height, int xl, int yl )
{
	LPITEMGROUND	item = (LPITEMGROUND)g_Item;
	BOOL			crash_Result=0;
	
	while( item != NULL )
	{
		if(fire_Height > 32)		//荤恩旧篮虐 臭捞焊促 臭篮 版快
			return 0;
		if( (item->attr[ IATTR_ATTR] & IA2_OPENED) || (item->attr[ IATTR_ATTR] & IA2_BROKEN) )	//捞固 凯府芭唱 冠混唱乐绰 版快 
		{
			item = item->next;
			continue;
		}
		
		
		if( item->spr[0] == NULL ) return 0;
		
		/*
		g_Item->server_id = i->server_id;
		g_Item->no	  = i->no;
		g_Item->sx    = i->sx;
		g_Item->sy	  = i->sy;
		g_Item->offx  = i->offx;
		g_Item->offy  = i->offy;
		g_Item->x     = i->x; 
		g_Item->y     = i->y; 
		g_Item->mx    = i->x / TILE_SIZE;
		g_Item->my    = i->y / TILE_SIZE;
		
		  g_Item->attr[0]	= i->attr[0];
		  g_Item->attr[1]	= i->attr[1];
		  g_Item->attr[2]	= i->attr[2];
		  g_Item->attr[3]	= i->attr[3];
		  g_Item->attr[4]	= i->attr[4];
		  g_Item->attr[5]	= i->attr[5];
		*/
		
		///////////////////////// Item狼 辆/染绵 辨捞 //////////////////////////////
		int item_Spr_X = item->spr[0]->xl;
		int item_Spr_Y = item->spr[0]->yl;
		
		crash_Result=BoxAndBoxCrash( x, y, xl, yl, item->x-(item_Spr_X/2), item->y-(item_Spr_Y/2), item_Spr_X, item_Spr_Y);
		
		if( crash_Result )		//面倒捞 老绢抄 版快
		{
			//Item box阑 眉农窍咯 俊聪皋捞记鳖瘤 谎妨拎具窍绰 版快(茄锅 鸥拜寸茄 Item篮 肚促矫 鸥拜 寸窍瘤 臼霸)
			if( /*range_Check==1 &&*/ !((item->attr[ IATTR_ATTR] & IA2_OPENED) || (item->attr[ IATTR_ATTR] & IA2_BROKEN)) )
			{
				if(lpML->lpChar_Own == Hero)
					Send_CMD_ITEM_BOX_MAGIC_BREAK( (int)item->server_id );
				return item;
			}
			//else	return item;
		}
		item = item->next;
	}
	return 0;
}

void RecvCMD_SERVER_MAGICTRAP_EXPOSE( t_server_magictrap_expose *p)
{
	LPCHARACTER	target_Char = FindCharacter( &g_CharacterList, p->target_id );
	if(target_Char == NULL )	return;
	
	if(target_Char->type==SPRITETYPE_CHARACTER)
	{
		CharDoAni( target_Char, target_Char->direction, ACTION_ATTACKED);
	}
	else
	{
		CharDoAni( target_Char, target_Char->direction, MON1_ATTACKED);
	}
	
	switch( p->trap_Type )
	{
	case 0:
		InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE1, 0, p->x*TILE_SIZE, p->y*TILE_SIZE, p->x*TILE_SIZE, p->y*TILE_SIZE);
		//InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE1, 0, p->x*TILE_SIZE, p->y*TILE_SIZE, p->x*TILE_SIZE, p->y*TILE_SIZE);
		//InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE1, 0, p->x+1*TILE_SIZE, p->y+1*TILE_SIZE, p->x+1*TILE_SIZE, p->y+1*TILE_SIZE);
		//InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE1, 0, p->x+1*TILE_SIZE, p->y-1*TILE_SIZE, p->x+1*TILE_SIZE, p->y-1*TILE_SIZE);
		//InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE1, 0, p->x-1*TILE_SIZE, p->y+1*TILE_SIZE, p->x-1*TILE_SIZE, p->y+1*TILE_SIZE);
		break;
	case 1:
		InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE2, 0, p->x*TILE_SIZE, p->y*TILE_SIZE, p->x*TILE_SIZE, p->y*TILE_SIZE);
		//InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE2, 0, p->x*TILE_SIZE, p->y*TILE_SIZE, p->x*TILE_SIZE, p->y*TILE_SIZE);
		//InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE2, 0, p->x*TILE_SIZE, p->y+1*TILE_SIZE, p->x*TILE_SIZE, p->y+1*TILE_SIZE);
		//InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE2, 0, p->x-1*TILE_SIZE, p->y*TILE_SIZE, p->x-1*TILE_SIZE, p->y*TILE_SIZE);
		//InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE2, 0, p->x+1*TILE_SIZE, p->y*TILE_SIZE, p->x+1*TILE_SIZE, p->y*TILE_SIZE);
		break;
	case 2:
		InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE3, 0, p->x*TILE_SIZE, p->y*TILE_SIZE, p->x*TILE_SIZE, p->y*TILE_SIZE);
		//InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE3, 0, p->x*TILE_SIZE, p->y-1*TILE_SIZE, p->x*TILE_SIZE, p->y-1*TILE_SIZE);
		//InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE3, 0, p->x+1*TILE_SIZE, p->y-1*TILE_SIZE, p->x+1*TILE_SIZE, p->y-1*TILE_SIZE);
		//InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE3, 0, p->x-1*TILE_SIZE, p->y*TILE_SIZE, p->x-1*TILE_SIZE, p->y*TILE_SIZE);
		//InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE3, 0, p->x+1*TILE_SIZE, p->y*TILE_SIZE, p->x+1*TILE_SIZE, p->y*TILE_SIZE);
		//InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE3, 0, p->x-1*TILE_SIZE, p->y+1*TILE_SIZE, p->x-1*TILE_SIZE, p->y+1*TILE_SIZE);
		//InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE3, 0, p->x*TILE_SIZE, p->y+1*TILE_SIZE, p->x*TILE_SIZE, p->y+1*TILE_SIZE);
		//InsertMagic(target_Char, target_Char, EFFECT_TRAP_EXPOSE3, 0, p->x+1*TILE_SIZE, p->y+1*TILE_SIZE, p->x+1*TILE_SIZE, p->y+1*TILE_SIZE);
		break;
	}
}

void RecvCMD_SERVER_MAGICAL_DETECT( t_server_magical_detect *p)
{
	//LPCHARACTER	target_Char = FindCharacter( &g_CharacterList, p->target_id );
	//if(target_Char == NULL )	return;
	
	switch( p->type )
	{
	case 1:			//付过 飘乏牢 版快
		InsertMagic(Hero, Hero, 121, 0, p->tile_X*32, p->tile_Y*32, 0, 0);
		break;
	case 2:			//付过 拱眉 棺 扁鸥 付过 瓤仿眉
		InsertMagic(Hero, Hero, 128, 0, p->tile_X*32, p->tile_Y*32, 0, 0);
		break;
	}
}

///////////////// 0201  捞 痹绕 ////////////////////////
// 努扼捞攫飘狼 付过俊 狼茄 漂沥 瓤苞 疙飞阑 罐绰 窃荐
void RecvCMD_SERVER_MAGICCOMMAND( t_server_magic_command *p)
{
	switch(p->command)
	{
	case SET_LOSTSIGHT:		//惑怕辆丰绰 努扼捞攫飘俊辑 魄窜窍咯 辆丰
		{
			// 窜瘤 敲饭弊 棺 矫埃父 悸泼窍绊 角力 楷免篮 map.cpp狼 MapBright窃荐俊辑 贸府
			Hero->sight			= 3;
			Hero->lostSight		= 31;//矫仿惑角 惑怕甫 悸泼窃
			Hero->lostSightTime	= p->sub_term+g_curr_time;	//矫仿惑角 蜡瘤 矫埃(辑滚俊辑 舅妨柯 沥荐屈 矫埃-檬)
			break;
		}
		//////////////// 0809 lhs 眠啊 (涅胶飘侩 荤款靛) ////////////////
	case CCD_START_QUEST:	//涅胶飘 矫累侩 家府	15000
		{
			PlayListAutoSounds(50,0,0,0);
			break;
		}
	case CCD_END_QUEST:		//涅胶飘 辆丰 家府			15001	
		{
			PlayListAutoSounds(51,0,0,0);
			break;
		}
	case CCD_QUEST_SALUTE:	//涅胶飘侩 绵器				15002
		{
			LPCHARACTER		lpChar = ReturnCharacterPoint( p->sub_command );
			InsertMagic( lpChar, lpChar, 374, 0, 0,0,0,0 );
			break;
		}
	case CCD_QUEST_GETSKILL://扁贱裙垫 家府				15003
		{
			//PlayListAutoSounds(52,0,0,0);				// 0910 YGI
			break;
		}
	case CCD_QUEST_GETITEM:	//酒袍裙垫 家府				15004
		{
			//PlayListAutoSounds(53,0,0,0);				// 0910 YGI
			break;
		}
	case CCD_QUEST_MONSTER:	//阁胶磐 魔涝 家府			15005
		{
			PlayListAutoSounds(54,0,0,0);
			break;
		}
	case CCD_START_QUEST_BBS://傍瘤荤亲(急器) 家府		15006
		{
			PlayListAutoSounds(55,0,0,0);
			break;
		}
	case CCD_END_QUEST_BBS:	//傍瘤荤亲(辆丰) 家府		15007
		{
			PlayListAutoSounds(56,0,0,0);
			break;
		}
	case CCD_COMPLETE_QUEST://涅胶飘狼 辆丰甫 舅府绰 瓤苞	15008
		{
			LPCHARACTER		lpChar = ReturnCharacterPoint( p->sub_command );
			InsertMagic( lpChar, lpChar, 441, 0, 0,0,0,0 );
			break;
		}
	case OPERATOR_PLAYSOUND_EVENT1:		//青荤 矫累阑 舅府绰 绵啊
		{
			PlayListAutoSounds(62,0,0,0);
			break;
		}
	case OPERATOR_PLAYSOUND_EVENT2:		//冠荐家府
		{
			PlayListAutoSounds(65,0,0,0);
			break;
		}
	case SET_CUREBLIEND:	//矫具惑角 雀汗 贸府
		{
			Hero->sight			= 10;
			Hero->lostSight		= 0;
			Hero->lostSightTime	= 0;
			break;
		}
		
	case SET_INFORMATION:
		{
			LPCHARACTER dch = FindCharacter( &g_CharacterList, p->sub_command );
			// 措惑磊狼 沥焊甫 唱父捞 杭荐 乐霸 贸府
			AddCurrentStatusMessage(90, 70, 255, "Level:%d / HP:%d / MP:%d / STR:%d / WIS:%d / INT_:%d", dch->_lev, dch->_Hp, dch->_Mp, dch->_str, dch->_Wis, dch->_Int);
			break;
		}
		
		///////////////////////////////////////////////////////////////////////1010 KKH 官诧 何盒..////////////////////////////////////////////////////////
		//////////////////// 0811 yjs 眠啊 ////////////////////////
	case FIGHT_RESULT:		//磊脚捞 菩茄 版快
		{
			LPCHARACTER dch = FindCharacter( &g_CharacterList, p->sub_command );
			switch(p->sub_term)
			{
			case FIGHT_WIN:
				AddCurrentStatusMessage(50, 255, 120, lan->OutputMessage(3,1), Hero->name, dch->name);//010215 lsw
				// 0926 铰府 捞棋飘 
				InsertMagic(Hero, Hero, 495, 0, 0,0,0,0);
				InsertMagic(Hero, Hero, 494, 0, 0,0,0,0);
				PlayListAutoSounds(51,0,0,0);
				InsertMagic(dch, dch, 496, 0, 0,0,0,0);
				Fight_Stone_End();
				break;	
			case FIGHT_LOSE:
				AddCurrentStatusMessage(255, 60, 80, lan->OutputMessage(3,2), Hero->name, dch->name);//010215 lsw
				// 0926 菩硅 捞棋飘 
				//InsertMagic(Hero, Hero, 496, 0, 0,0,0,0);
				InsertMagic(dch, dch, 495, 0, 0,0,0,0);
				InsertMagic(dch, dch, 494, 0, 0,0,0,0);
				PlayListAutoSounds(53,0,0,0);
				InsertMagic(Hero, Hero, 496, 0, 0,0,0,0);
				Fight_Stone_End();
				break;
			case FIGHT_DRAW:
				AddCurrentStatusMessage(80, 50, 255, lan->OutputMessage(3,3), dch->name);//010215 lsw
				Fight_Stone_End();
				break;
			case FIGHT_LOGOUT:		// 010604 YGI
				AddCurrentStatusMessage(50, 255, 120, lan->OutputMessage(3,4), Hero->name);//010215 lsw
				// 0926 菩硅 捞棋飘 
				InsertMagic(Hero, Hero, 495, 0, 0,0,0,0);
				InsertMagic(Hero, Hero, 494, 0, 0,0,0,0);
				PlayListAutoSounds(51,0,0,0);
				//InsertMagic(Hero, Hero, 496, 0, 0,0,0,0);		// 惑措规捞 唱艾阑 版快 
				Fight_Stone_End();
				break;
			}
			break;
		}
		///////////////////////////////////////////////////////////////////////1010 KKH 官诧 何盒.. 场////////////////////////////////////////////////////////
		////////////////////////////////////////////////////////////
	}
}

// 鉴埃 捞悼 付过阑 荤侩沁阑 锭 搬苞 贸府
void RecvCMD_MAGIC_POSITION( t_server_magic_position *p)
{
	LPCHARACTER	ch = FindCharacter(&g_CharacterList, p->idTarget);
	if( ch == NULL ) return;
	
	ch->moveFlag=0;
	ch->pathcount=0;
	CharDoAni(ch, ch->direction, ch->basicAction);
	
	ch->gox = ch->x = p->nX*32;
	ch->position.x	= p->nX;
	ch->goy = ch->y = p->nY*32;
	ch->position.y	= p->nY;
	
	switch(p->nType)
	{
	case 1:		//phasing
		{
			InsertMagic(ch,ch, 255,	9, 0, 0, ch->x, ch->y);
			break;
		}
	case 2:		//townportal
		{
			InsertMagic(ch,ch, 299,	9, 0, 0, ch->x, ch->y);
			break;
		}
	case 3:		//teleport - 捞悼茄 饶俊 促弗 付过阑 捞绢 嘛绢林刚 泛捞 吧啡阑 版快 呈公 词澜
		{
			InsertMagic(ch,ch, 409,	9, ch->x, ch->y, ch->x, ch->y);
			break;
		}
	case 4:		//Multiport
		{
			//InsertMagic(ch,ch, 255,			9, 0, 0, ch->x, ch->y);
			break;
		}
	case 5:		//Memorizingportal
		{
			//InsertMagic(ch,ch, 255,			9, 0, 0, ch->x, ch->y);
			break;
		}
	case 6:		// 款康磊俊 狼茄 碍力捞悼.
		{
			if( ch == Hero )	AddCurrentStatusMessage( 255,255,255, lan->OutputMessage(3,5) );//010215 lsw
			break;
		}
    case 7:
		{
			InsertMagic(ch,ch, 470,	0, 0, 0, ch->x, ch->y);
			break;
		}
	}
	
	if( ch == Hero )		// 010425 YGI
	{
		SendModifyPosition( ch );
		g_Map.tox = ch->position.x - (GAME_SCREEN_XSIZE/32/2);
		g_Map.toy = ch->position.y - (GAME_SCREEN_YSIZE/32/2);
		
		if (p->nType == 3)
		{
			StartSetView(ch);
			SetView(ch, ch->sight);		//鉴埃 捞悼茄 弊 谅钎甫 拳搁狼 吝居栏肺 捞悼
			SetHeroPosition( 0 );
		}
		else
			SetHeroPosition( 1 );
	}
}	

void RecvCMD_CHARACTER_CONDITION( t_server_character_condition *p, int type )
{	
	//CON_NORMAL沥惑0/CON_ACTIVE劝悼1/CON_SLOW蠢妨咙2/CON_SLUGGISH公扁仿3/CON_DAZE去鄂4/CON_POISON吝刀5/CON_STONE籍拳6/CON_DEATH磷澜7
	bool		action_On=0;
	LPCHARACTER ch=FindCharacter( &g_CharacterList, p->idTarget);
	if(ch==NULL)  return;
	// 秦寸 某腐磐狼 惑怕甫 函拳矫虐绰 窃荐
	ConditionSet(ch, p->nState);
	
	if( type == CMD_SERVER_CHARACTER_CONDITION2 )		// 瞒捞蔼阑 焊郴林绰霸 酒聪扼 弊 傈眉甫 焊郴霖促.
	{
		p->nLife -= ch->hp;
	}
	// 0106KHS
	if( p->nLife < 0 )
	{
		AddNumberAni( NUMBER_ANIMATION_TYPE_DOWN_, ch->y+1, ch->x, ch->y-40, abs( p->nLife) );
		
		if( p->idTarget<10000 )
		{
			CharDoAni(ch, ch->direction, ACTION_ATTACKED );
			action_On = 1;
			ch->changeActionFlag = 1;
		}
		else
		{	
			CharDoAni(ch, ch->direction, MON1_ATTACKED );
			action_On = 1;
			ch->changeActionFlag = 1;
		}
	}
	else if( p->nLife > 0 )//020530 lsw
	{
		AddNumberAni( NUMBER_ANIMATION_TYPE_UP_, ch->y+1, ch->x, ch->y-40, abs( p->nLife) );
		ch->changeActionFlag = 0;
		CharDoAni(ch, ch->direction, ch->basicAction );
	}
	
	///////////////////////////////////// 瘤陛何磐绰 某腐磐 惑怕俊 蝶弗 促弗 贸府 //////////////////////////////////////
	if( ch->condition == CON_DEATH )//p->condition == CON_DEATH )		//磷澜惑怕肺 傈券矫 贸府
	{
		ch->changeActionFlag = 0;
		if( p->idTarget<10000 )
		{
			ch->changeActionFlag = 0;
			CharDoAni(ch, ch->direction, ACTION_DIE);
		}
		else
		{
			ch->changeActionFlag = 0;
			CharDoAni(ch, ch->direction, MON1_DIE);
		}
		
		//ch->condition=CON_DEATH;
		ch->hp			= 0;
		ch->mp			= 0;
		ch->viewtype	= VIEWTYPE_NORMAL_;		//促弗 惑怕柳青 惑怕俊辑 磷菌阑锭(扁粮惑怕俊 狼茄 瓤苞 绝局扁 困秦)
		
		if( ch==Hero )
		{
			SCharacterData.condition	 = CON_DEATH;
			SCharacterData.nCharacterHP  = 0;
			SCharacterData.nCharacterMP  = 0;
		}
		return;
	}
	
	//////////////////////////////////////////////////
	// 磷绰 惑怕寇狼 惑怕 函拳矫父 贸府
	// 措惑眉啊 官肺 唱牢 版快父 贸府(皋春何盒 叼胶敲饭捞)
	
	if( ch == Hero )
	{
		SCharacterData.nCharacterHP += p->nLife;
		if( SCharacterData.nCharacterHP > SCharacterData.nCharacterMAXHP ) 
			SCharacterData.nCharacterHP = SCharacterData.nCharacterMAXHP ;
		
		SCharacterData.condition = ch->condition;
		if(SCharacterData.nCharacterHP<=0)	SCharacterData.nCharacterHP	 = 1;
	}
	
	if( ch->condition == CON_NORMAL )			//惑怕啊 混酒乐绰 版快
	{
		if( ch->viewtype < VIEWTYPE_TRANSPARENCY_ )		//捧疙牢埃 惑怕 捞惑狼 促弗 惑怕牢 版快绰 弊成 泅 轰鸥涝 瘤加蜡瘤
			ch->viewtype			= VIEWTYPE_NORMAL_;
		ch->hp				   += p->nLife;
		if(ch->hp<= 0) ch->hp   = 1;
		ch->dieani				= 0;
		ch->blood_Set			= false;
		if(!action_On)
		{
			ch->changeActionFlag	= 0;
			CharDoAni(ch, ch->direction, ch->basicAction);
		}
	}
	else
	{
		if (ch->viewtype < VIEWTYPE_TRANSPARENCY_)
		{ // 捧疙牢埃 惑怕 捞惑狼 促弗 惑怕牢 版快绰 弊成 泅 轰鸥涝 瘤加蜡瘤
			if (ch->condition&CON_SLOW)    ch->viewtype = VIEWTYPE_SLOW_;
			if (ch->condition&CON_POISON)  ch->viewtype = VIEWTYPE_POISON_;
			if (ch->condition&CON_CURSE)   ch->viewtype = VIEWTYPE_CURSE_;
			if (ch->condition&CON_DAZE)    ch->viewtype = VIEWTYPE_CONFUSION_;
			if (ch->condition&CON_FROZEN)  ch->viewtype = VIEWTYPE_FROZEN_;
			if (ch->condition&CON_STONE)
			{
				ch->viewtype = VIEWTYPE_STONE_;
				ch->pathcount = 0;
				ch->moveFlag  = 0;
				ch->changeActionFlag	= 1;
			}
		}
	}
}

void RecvCMD_SERVER_MAGICVIEWTYPE( t_server_magicviewtype *p)
{	//< CSD-030516
	LPCHARACTER ch = FindCharacter(&g_CharacterList, p->target_id);
	
	if (ch == NULL)
	{
		return;
	}

	switch (p->view_Type)
	{
	case VIEWTYPE_OBSERVE_:
		{
			SetBattlePeace(PEACE_MODE);
			break;
		}
	}

	ch->viewtype = (char)p->view_Type;
}	//> CSD-030516

void SendCMD_CHARACTER_DEMAND( int command_type, int target_id)		//牢磊:目膏靛 皋矫瘤 #define疙莫,格钎id
{
	t_packet p;
	
	p.h.header.type = CMD_CLIENT_CHARACTER_DEMAND;
	p.h.header.size	= sizeof( t_client_character_demand );
	{
		p.u.angra.client_character_demand.target_id		= target_id;
		p.u.angra.client_character_demand.command_type	= command_type;
		//p.u.client_arigement_demand
	}
	QueuePacket( &p, 1 );	
}

void RecvCMD_ARIGEMENT_RESPONSE( t_server_arigement_response *p )
{	//< CSD-030324
	return;	// thai2 YGI
	//> CSD-030324
	LPCHARACTER ch	= FindCharacter( &g_CharacterList, p->target_id );
	if(ch == NULL ) return;
	
	ch->arigement	= p->arigement;
	switch(p->arigement)
	{
		//case 0:
	case 1:
	case 2:
	case 3:
		InsertMagic(ch, ch, 344, 0, 0, 0, 0, 0);		//blue
		break;
	case 4:
	case 5:
	case 6:
		InsertMagic(ch, ch, 345, 0, 0, 0, 0, 0);		//Green
		break;
	case 7:
	case 8:
	case 9:
		InsertMagic(ch, ch, 346, 0, 0, 0, 0, 0);		//red
		break;
	}
}

void EndCastMagic(LPCHARACTER scr/*MAGICLIST* lpML*/)
{
	const int nSelect = scr->excute_MagicNum;
	scr->ready_Magic = (g_mgrBattle.IsCombat(nSelect)) ? 2:0;
	scr->end_Casting =0;
	scr->end_ReadyMagic =0;
	scr->end_RunMagic =0;
	scr->bow_Type =0;				//劝 鸥涝阑 檬扁拳
				
	RectImageOn=0;
}

void CheckDoingAppointMagic(void)
{			
	int		x,y;
	int		dir     = Hero->direction;	
	int		sprc    = Hero->AnimationTable[ Hero->nCurrentAction].cFrame[  Hero->nCurrentFrame ];
	Spr		*s		= &(CharSpr[Hero->sprno].sp[ dir ][ sprc]);
	bool	firePattern = 0;	//0->流柳菩畔/1->蜡档菩畔	
	int		magic_no = 0;
	int		distance = 0;
	// 付过阑 惯荤茄瘤 0.8檬 捞惑 版苞秦具父 肚促矫 惯荤 啊瓷
	if ( timeGetTime()-g_FireTime < FIRE_DELAY && g_FireTime !=0 )
		return;
	// 拳混幅 shoot_Time
	if (g_mgrBattle.IsThrow(Hero->excute_MagicNum, true))  return; // CSD-021021
	if (SCharacterData.nCharacterHP <= 0)                  return;
	///////////////////////////////////////////////////////////////////////////////////
	if(!(Hero->ready_Magic==2 || Hero->ready_Magic==3) && !tool_ID_EFFECT_TEST )
		return;
	
	if(tool_ID_EFFECT_TEST)	Hero->excute_MagicNum=30;
	
	if (!g_mgrBattle.IsPickUp(Hero, g_GameInfo.lpcharacter))
	{ //< CSD-021128 
		g_GameInfo.lpcharacter = NULL;
	} //> CSD-021128 

⌨️ 快捷键说明

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