Código:
#include "stdafx.h"
CallCharacter_Extern_Class CallClassExtern;
CallCharacter_Extern_Class::~CallCharacter_Extern_Class(){}
CallCharacter_Extern_Class::CallCharacter_Extern_Class(){}
void gObjCalCharacterEx(int aIndex)
{
CallClassExtern.gObjCalCharacterEx(aIndex);
}
void CallCharacter_Extern_Class::gObjCalCharacterEx(DWORD aIndex)
{
OBJECTSTRUCT * gObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);
gObjCalCharacter(gObj->m_Index);
switch(gObj->Class)
{
case 0:
gObj->m_AttackDamageMinRight = (gObj->Strength / CalCharacterStruct.DW_AtackMinRight);
gObj->m_AttackDamageMaxRight = (gObj->Strength / CalCharacterStruct.DW_AtackMaxRight);
gObj->m_AttackDamageMinLeft = (gObj->Strength / CalCharacterStruct.DW_AtackMinLeft);
gObj->m_AttackDamageMaxLeft = (gObj->Strength / CalCharacterStruct.DW_AtackMaxLeft);
gObj->m_AttackSpeed = gObj->Dexterity / CalCharacterStruct.DW_AtackSpeed;
gObj->m_MagicSpeed = gObj->Dexterity / CalCharacterStruct.DW_AtackSpeed;
gObj->m_SuccessfulBlocking = gObj->Dexterity / CalCharacterStruct.DW_SuccessfulBlocking;
gObj->m_Defense = gObj->Dexterity / CalCharacterStruct.DW_Defense;
gObj->m_MagicDamageMin = (gObj->Energy / CalCharacterStruct.DW_MagicDMGMin);
gObj->m_MagicDamageMax = (gObj->Energy / CalCharacterStruct.DW_MagicDMGMax);
break;
case 1:
gObj->m_AttackDamageMinRight = (gObj->Strength / CalCharacterStruct.DK_AtackMinRight);
gObj->m_AttackDamageMaxRight = (gObj->Strength / CalCharacterStruct.DK_AtackMaxRight);
gObj->m_AttackDamageMinLeft = (gObj->Strength / CalCharacterStruct.DK_AtackMinLeft);
gObj->m_AttackDamageMaxLeft = (gObj->Strength / CalCharacterStruct.DK_AtackMaxLeft);
gObj->m_AttackSpeed = gObj->Dexterity / CalCharacterStruct.DK_AtackSpeed;
gObj->m_MagicSpeed = gObj->Dexterity / CalCharacterStruct.DK_MagicSpeed;
gObj->m_SuccessfulBlocking = gObj->Dexterity / CalCharacterStruct.DK_SuccessfulBlocking;
gObj->m_Defense = gObj->Dexterity / CalCharacterStruct.DK_Defense;
gObj->m_MagicDamageMin = (gObj->Energy / CalCharacterStruct.DK_MagicDMGMin);
gObj->m_MagicDamageMax = (gObj->Energy / CalCharacterStruct.DK_MagicDMGMax);
break;
case 2:
gObj->m_AttackDamageMinRight = (gObj->Strength / CalCharacterStruct.ELF_AtackMinRight);
gObj->m_AttackDamageMaxRight = (gObj->Strength / CalCharacterStruct.ELF_AtackMaxRight);
gObj->m_AttackDamageMinLeft = (gObj->Strength / CalCharacterStruct.ELF_AtackMinLeft);
gObj->m_AttackDamageMaxLeft = (gObj->Strength / CalCharacterStruct.ELF_AtackMaxLeft);
gObj->m_AttackSpeed = gObj->Dexterity / CalCharacterStruct.ELF_AtackSpeed;
gObj->m_MagicSpeed = gObj->Dexterity / CalCharacterStruct.ELF_MagicSpeed;
gObj->m_SuccessfulBlocking = gObj->Dexterity / CalCharacterStruct.ELF_SuccessfulBlocking;
gObj->m_Defense = gObj->Dexterity/ CalCharacterStruct.ELF_Defense;
gObj->m_MagicDamageMin = (gObj->Energy / CalCharacterStruct.ELF_MagicDMGMin);
gObj->m_MagicDamageMax = (gObj->Energy / CalCharacterStruct.ELF_MagicDMGMax);
break;
case 3:
gObj->m_AttackDamageMinRight = (gObj->Strength / CalCharacterStruct.MG_AtackMinRight)+(gObj->Energy/CalCharacterStruct.MG_AtackMinRight);
gObj->m_AttackDamageMaxRight = (gObj->Strength / CalCharacterStruct.MG_AtackMaxRight)+(gObj->Energy/CalCharacterStruct.MG_AtackMaxRight);
gObj->m_AttackDamageMinLeft = (gObj->Strength / CalCharacterStruct.MG_AtackMinLeft)+(gObj->Energy/CalCharacterStruct.MG_AtackMinLeft);
gObj->m_AttackDamageMaxLeft = (gObj->Strength / CalCharacterStruct.MG_AtackMaxLeft)+(gObj->Energy/CalCharacterStruct.MG_AtackMaxLeft);
gObj->m_AttackSpeed = gObj->Dexterity / CalCharacterStruct.MG_AtackSpeed;
gObj->m_MagicSpeed = gObj->Dexterity / CalCharacterStruct.MG_MagicSpeed;
gObj->m_SuccessfulBlocking = gObj->Dexterity / CalCharacterStruct.MG_SuccessfulBlocking;
gObj->m_Defense = gObj->Dexterity/ CalCharacterStruct.MG_Defense;
gObj->m_MagicDamageMin = (gObj->Energy / CalCharacterStruct.MG_MagicDMGMin);
gObj->m_MagicDamageMax = (gObj->Energy / CalCharacterStruct.MG_MagicDMGMax);
break;
case 4:
gObj->m_AttackDamageMinRight = ((gObj->Strength / CalCharacterStruct.DL_AtackMinRight) + (gObj->Energy / (CalCharacterStruct.DL_AtackMinRight*2)));
gObj->m_AttackDamageMaxRight = ((gObj->Strength / CalCharacterStruct.DL_AtackMaxRight) + (gObj->Energy / (CalCharacterStruct.DL_AtackMaxRight*2)));
gObj->m_AttackDamageMinLeft = ((gObj->Strength / CalCharacterStruct.DL_AtackMinLeft) + (gObj->Energy / (CalCharacterStruct.DL_AtackMinLeft*2)));
gObj->m_AttackDamageMaxLeft = ((gObj->Strength / CalCharacterStruct.DL_AtackMaxLeft) + (gObj->Energy / (CalCharacterStruct.DL_AtackMaxLeft*2)));
gObj->m_AttackSpeed = gObj->Dexterity / CalCharacterStruct.DL_AtackSpeed;
gObj->m_MagicSpeed = gObj->Dexterity / CalCharacterStruct.DL_MagicSpeed;
gObj->m_SuccessfulBlocking = gObj->Dexterity / CalCharacterStruct.DL_SuccessfulBlocking;
gObj->m_Defense = gObj->Dexterity / CalCharacterStruct.DL_Defense;
gObj->m_MagicDamageMin = (gObj->Energy / CalCharacterStruct.DL_MagicDMGMin);
gObj->m_MagicDamageMax = (gObj->Energy / CalCharacterStruct.DL_MagicDMGMax);
break;
case 5:
gObj->m_AttackDamageMinRight = ((gObj->Strength+gObj->Dexterity) / CalCharacterStruct.SUM_AtackMinRight);
gObj->m_AttackDamageMaxRight = ((gObj->Strength+gObj->Dexterity) / CalCharacterStruct.SUM_AtackMaxRight);
gObj->m_AttackDamageMinLeft = ((gObj->Strength+gObj->Dexterity) / CalCharacterStruct.SUM_AtackMinLeft);
gObj->m_AttackDamageMaxLeft = ((gObj->Strength+gObj->Dexterity) / CalCharacterStruct.SUM_AtackMaxLeft);
gObj->m_AttackSpeed = (gObj->Dexterity / CalCharacterStruct.SUM_AtackSpeed);
gObj->m_MagicSpeed = (gObj->Dexterity / CalCharacterStruct.SUM_MagicSpeed);
gObj->m_SuccessfulBlocking = (gObj->Dexterity / CalCharacterStruct.SUM_SuccessfulBlocking);
gObj->m_Defense = (gObj->Dexterity / CalCharacterStruct.SUM_Defense);
gObj->m_MagicDamageMin = (gObj->Energy / CalCharacterStruct.SUM_MagicDMGMin);
gObj->m_MagicDamageMax = (gObj->Energy / CalCharacterStruct.SUM_MagicDMGMax);
break;
}
}
void CallCharacter_Extern_Class::Init()
{
/*LOAD*/
this->CalCharacterStruct.Enabeld = GetPrivateProfileInt("ObjCallCharacter","NewCalCharaterLoad",1,CallCharacterINI);
/*CALSSES DE DW SM GRM*/
this->CalCharacterStruct.DW_AtackMinRight = GetPrivateProfileInt("ObjCallCharacter","DW_MinAtackRight",100,CallCharacterINI);
this->CalCharacterStruct.DW_AtackMaxRight = GetPrivateProfileInt("ObjCallCharacter","DW_MaxAtackRight",50,CallCharacterINI);
this->CalCharacterStruct.DW_AtackMinLeft = GetPrivateProfileInt("ObjCallCharacter","DW_MinAtackLeft",100,CallCharacterINI);
this->CalCharacterStruct.DW_AtackMaxLeft = GetPrivateProfileInt("ObjCallCharacter","DW_MaxAtackLeft",50,CallCharacterINI);
this->CalCharacterStruct.DW_AtackSpeed = GetPrivateProfileInt("ObjCallCharacter","DW_AtackSpeed",35,CallCharacterINI);
this->CalCharacterStruct.DW_MagicSpeed = GetPrivateProfileInt("ObjCallCharacter","DW_MagicSpeed",30,CallCharacterINI);
this->CalCharacterStruct.DW_SuccessfulBlocking = GetPrivateProfileInt("ObjCallCharacter","DW_SucessFullBlock",40,CallCharacterINI);
this->CalCharacterStruct.DW_Defense = GetPrivateProfileInt("ObjCallCharacter","DW_Defense",12,CallCharacterINI);
this->CalCharacterStruct.DW_MagicDMGMin = GetPrivateProfileInt("ObjCallCharacter","DW_MagicDmgMin",100,CallCharacterINI);
this->CalCharacterStruct.DW_MagicDMGMax = GetPrivateProfileInt("ObjCallCharacter","DW_MagicDmgMax",80,CallCharacterINI);
/*FIM DA CLASSE DE DW SM GRM*/
/*CLASSES DK BK BM*/
this->CalCharacterStruct.DK_AtackMinRight = GetPrivateProfileInt("ObjCallCharacter","DK_MinAtackRight",100,CallCharacterINI);
this->CalCharacterStruct.DK_AtackMaxRight = GetPrivateProfileInt("ObjCallCharacter","DK_MaxAtackRight",50,CallCharacterINI);
this->CalCharacterStruct.DK_AtackMinLeft = GetPrivateProfileInt("ObjCallCharacter","DK_MinAtackLeft",100,CallCharacterINI);
this->CalCharacterStruct.DK_AtackMaxLeft = GetPrivateProfileInt("ObjCallCharacter","DK_MaxAtackLeft",50,CallCharacterINI);
this->CalCharacterStruct.DK_AtackSpeed = GetPrivateProfileInt("ObjCallCharacter","DK_AtackSpeed",35,CallCharacterINI);
this->CalCharacterStruct.DK_MagicSpeed = GetPrivateProfileInt("ObjCallCharacter","DK_MagicSpeed",30,CallCharacterINI);
this->CalCharacterStruct.DK_SuccessfulBlocking = GetPrivateProfileInt("ObjCallCharacter","DK_SucessFullBlock",40,CallCharacterINI);
this->CalCharacterStruct.DK_Defense = GetPrivateProfileInt("ObjCallCharacter","DK_Defense",12,CallCharacterINI);
this->CalCharacterStruct.DK_MagicDMGMin = GetPrivateProfileInt("ObjCallCharacter","DK_MagicDmgMin",100,CallCharacterINI);
this->CalCharacterStruct.DK_MagicDMGMax = GetPrivateProfileInt("ObjCallCharacter","DK_MagicDmgMax",80,CallCharacterINI);
/*FIM DAS CLASSES DE DK BK BM*/
/*CLASSES DE ELF ME HE*/
this->CalCharacterStruct.ELF_AtackMinRight = GetPrivateProfileInt("ObjCallCharacter","ELF_MinAtackRight",100,CallCharacterINI);
this->CalCharacterStruct.ELF_AtackMaxRight = GetPrivateProfileInt("ObjCallCharacter","ELF_MaxAtackRight",50,CallCharacterINI);
this->CalCharacterStruct.ELF_AtackMinLeft = GetPrivateProfileInt("ObjCallCharacter","ELF_MinAtackLeft",100,CallCharacterINI);
this->CalCharacterStruct.ELF_AtackMaxLeft = GetPrivateProfileInt("ObjCallCharacter","ELF_MaxAtackLeft",50,CallCharacterINI);
this->CalCharacterStruct.ELF_AtackSpeed = GetPrivateProfileInt("ObjCallCharacter","ELF_AtackSpeed",35,CallCharacterINI);
this->CalCharacterStruct.ELF_MagicSpeed = GetPrivateProfileInt("ObjCallCharacter","ELF_MagicSpeed",30,CallCharacterINI);
this->CalCharacterStruct.ELF_SuccessfulBlocking = GetPrivateProfileInt("ObjCallCharacter","ELF_SucessFullBlock",40,CallCharacterINI);
this->CalCharacterStruct.ELF_Defense = GetPrivateProfileInt("ObjCallCharacter","ELF_Defense",12,CallCharacterINI);
this->CalCharacterStruct.ELF_MagicDMGMin = GetPrivateProfileInt("ObjCallCharacter","ELF_MagicDmgMin",100,CallCharacterINI);
this->CalCharacterStruct.ELF_MagicDMGMax = GetPrivateProfileInt("ObjCallCharacter","ELF_MagicDmgMax",80,CallCharacterINI);
/*FIM DAS CLASSES DE ELF ME HE*/
/*CLASSES DE MG E DM*/
this->CalCharacterStruct.MG_AtackMinRight = GetPrivateProfileInt("ObjCallCharacter","MG_MinAtackRight",100,CallCharacterINI);
this->CalCharacterStruct.MG_AtackMaxRight = GetPrivateProfileInt("ObjCallCharacter","MG_MaxAtackRight",50,CallCharacterINI);
this->CalCharacterStruct.MG_AtackMinLeft = GetPrivateProfileInt("ObjCallCharacter","MG_MinAtackLeft",100,CallCharacterINI);
this->CalCharacterStruct.MG_AtackMaxLeft = GetPrivateProfileInt("ObjCallCharacter","MG_MaxAtackLeft",50,CallCharacterINI);
this->CalCharacterStruct.MG_AtackSpeed = GetPrivateProfileInt("ObjCallCharacter","MG_AtackSpeed",35,CallCharacterINI);
this->CalCharacterStruct.MG_MagicSpeed = GetPrivateProfileInt("ObjCallCharacter","MG_MagicSpeed",30,CallCharacterINI);
this->CalCharacterStruct.MG_SuccessfulBlocking = GetPrivateProfileInt("ObjCallCharacter","MG_SucessFullBlock",40,CallCharacterINI);
this->CalCharacterStruct.MG_Defense = GetPrivateProfileInt("ObjCallCharacter","MG_Defense",12,CallCharacterINI);
this->CalCharacterStruct.MG_MagicDMGMin = GetPrivateProfileInt("ObjCallCharacter","MG_MagicDmgMin",100,CallCharacterINI);
this->CalCharacterStruct.MG_MagicDMGMax = GetPrivateProfileInt("ObjCallCharacter","MG_MagicDmgMax",80,CallCharacterINI);
/*FIM DAS CLASSES DE MG E DM*/
/*CLASSES DE DL E LE*/
this->CalCharacterStruct.DL_AtackMinRight = GetPrivateProfileInt("ObjCallCharacter","DL_MinAtackRight",100,CallCharacterINI);
this->CalCharacterStruct.DL_AtackMaxRight = GetPrivateProfileInt("ObjCallCharacter","DL_MaxAtackRight",50,CallCharacterINI);
this->CalCharacterStruct.DL_AtackMinLeft = GetPrivateProfileInt("ObjCallCharacter","DL_MinAtackLeft",100,CallCharacterINI);
this->CalCharacterStruct.DL_AtackMaxLeft = GetPrivateProfileInt("ObjCallCharacter","DL_MaxAtackLeft",50,CallCharacterINI);
this->CalCharacterStruct.DL_AtackSpeed = GetPrivateProfileInt("ObjCallCharacter","DL_AtackSpeed",35,CallCharacterINI);
this->CalCharacterStruct.DL_MagicSpeed = GetPrivateProfileInt("ObjCallCharacter","DL_MagicSpeed",30,CallCharacterINI);
this->CalCharacterStruct.DL_SuccessfulBlocking = GetPrivateProfileInt("ObjCallCharacter","DL_SucessFullBlock",40,CallCharacterINI);
this->CalCharacterStruct.DL_Defense = GetPrivateProfileInt("ObjCallCharacter","DL_Defense",12,CallCharacterINI);
this->CalCharacterStruct.DL_MagicDMGMin = GetPrivateProfileInt("ObjCallCharacter","DL_MagicDmgMin",100,CallCharacterINI);
this->CalCharacterStruct.DL_MagicDMGMax = GetPrivateProfileInt("ObjCallCharacter","DL_MagicDmgMax",80,CallCharacterINI);
/*FIM DAS CLASSES DE DL E LE*/
/*CLASSES DE SUM BS E DMS*/
this->CalCharacterStruct.SUM_AtackMinRight = GetPrivateProfileInt("ObjCallCharacter","SUM_MinAtackRight",100,CallCharacterINI);
this->CalCharacterStruct.SUM_AtackMaxRight = GetPrivateProfileInt("ObjCallCharacter","SUM_MaxAtackRight",50,CallCharacterINI);
this->CalCharacterStruct.SUM_AtackMinLeft = GetPrivateProfileInt("ObjCallCharacter","SUM_MinAtackLeft",100,CallCharacterINI);
this->CalCharacterStruct.SUM_AtackMaxLeft = GetPrivateProfileInt("ObjCallCharacter","SUM_MaxAtackLeft",50,CallCharacterINI);
this->CalCharacterStruct.SUM_AtackSpeed = GetPrivateProfileInt("ObjCallCharacter","SUM_AtackSpeed",35,CallCharacterINI);
this->CalCharacterStruct.SUM_MagicSpeed = GetPrivateProfileInt("ObjCallCharacter","SUM_MagicSpeed",30,CallCharacterINI);
this->CalCharacterStruct.SUM_SuccessfulBlocking = GetPrivateProfileInt("ObjCallCharacter","SUM_SucessFullBlock",40,CallCharacterINI);
this->CalCharacterStruct.SUM_Defense = GetPrivateProfileInt("ObjCallCharacter","SUM_Defense",12,CallCharacterINI);
this->CalCharacterStruct.SUM_MagicDMGMin = GetPrivateProfileInt("ObjCallCharacter","SUM_MagicDmgMin",100,CallCharacterINI);
this->CalCharacterStruct.SUM_MagicDMGMax = GetPrivateProfileInt("ObjCallCharacter","SUM_MagicDmgMax",80,CallCharacterINI);
/*FIM DAS CLASSES DE SUM BS E DMS*/
}