Ejemplo n.º 1
0
void Unit::SetMagicFlag(short magicType, bool enabled)
{
	long flag = NULL;

	switch(magicType)
	{
		case MAGICTYPE_INVISIBILITY:
			flag = STATUS_INVISIBILITY;
			break;
		case MAGICTYPE_ICE:
		case MAGICTYPE_ICE_LINEAR:
			flag = STATUS_FROZEN;
			break;
		case MAGICTYPE_BERSERK:
			flag = STATUS_BERSERK;
			break;
		case MAGICTYPE_PROTECT:
			switch(m_cMagicEffectStatus[magicType])
			{
			case MAGICPROTECT_PFA:
				flag = STATUS_PFA;
				break;
			case MAGICPROTECT_PFM:
			case MAGICPROTECT_AMP:
				flag = STATUS_PFM;
				break;
			case MAGICPROTECT_DS:
			case MAGICPROTECT_GDS:
				flag = STATUS_DEFENSESHIELD;
				break;
			}
			break;
		case MAGICTYPE_CONFUSE:
			switch (m_cMagicEffectStatus[magicType])
			{
			case 1:	// Language confuse
				break;
			case 2:	// Confusion
				break;
			case 3:
				flag = STATUS_ILLUSION;
				break;
			case 4:	
				flag = STATUS_ILLUSIONMOVEMENT;
				break;
			}
			break;
		default:
			// No flag
			return;
	}

	SetStatusFlag(flag, enabled);
}
Ejemplo n.º 2
0
void Back_Task(void)
{
	if((GetCounter1() == 1)&&(GetCounter2()== 1))
	{
		AddLocalParaSel();
		if(GetLocalParaSel() > 4)
			SetLocalParaSel(1);
		ClearScreen(0);
// 		Local_Menu(GetLocalAddr(),GetLocalDepSum(),GetLocalParaSel(),0);
		Local_Menu(GetLocalAddr(0),GetLocalAddr(1),GetLocalAddr(2),GetLocalDepSum(),GetLocalParaSel(),0);	
	}
	else 	if((GetCounter1() == 1)&&(GetCounter2()== 2))
	{
		AddCompRegParaSel();
		if(GetCompRegParaSel() > 3)
			SetCompRegParaSel(1);
		ClearScreen(0);
		CompReg_menu(GetCompRegDep(),GetCompRegNum(),0,GetCompRegAddr(),GetCompRegParaSel(),0);
// 		CompReg_menu(GetCompRegDep(),GetCompRegNum(),0,GetCompRegDep(),GetCompRegParaSel(),0);
	}
	else 	if((GetCounter1() == 1)&&(GetCounter2()== 3))
	{
		AddComSetSel();
		if(GetComSetSel() > 3)
			SetComSetSel(1);
		ClearScreen(0);
		CompSet_Menu(GetCompSetDep(),GetCompSetNum(),GetComSetSelSet(),GetComSetSel(),0);
	}
	else 	if((GetCounter1() == 1)&&(GetCounter2()== 4))
	{
		AddSelTime();
		if(GetSelTime() > 6)
			SetSelTime(1);
		ClearScreen(0);
		DateMod_Menu(GetYear(),GetMonth(),GetDay(),GetHour(),GetMintue(),GetSecond(),GetSelTime(),0);
	}
	else 	if((GetCounter1() == 1)&&(GetCounter2()== 5))
	{
		AddAnnSel();
		if(GetAnnSel() > 2)
			SetAnnSel(1);
		ClearScreen(0);
		Annotate_Menu(GetAnnDep(),GetAnnCompNum(),GetAnnSel());
		
	}
	else 	if((GetCounter1() == 2)&&(GetCounter2()== 1))
	{
		
	}
	else 	if((GetCounter1() == 2)&&(GetCounter2()== 2))
	{
		AddStatusFlag();
		if(GetStatusFlag() > 2)
			SetStatusFlag(1);
		ClearScreen(0);
		CompStat_Menu(GetStatusDep(),GetStatusComp(),0,0,0,GetStatusFlag());
	}
	else 	if((GetCounter1() == 2)&&(GetCounter2()== 3))
	{
		
	}
	else 	if((GetCounter1() == 3)&&(GetCounter2()== 1))
	{
		
	}
	else 	if((GetCounter1() == 3)&&(GetCounter2()== 2))
	{
		AddIntenFlag();
		if(GetIntenFlag() > 2)
			SetIntenFlag(1);
	}
}