Playing around with source codes time to time and while ago found out that you can add combo to any class, with any skill you like.
Code:
// ComboSkill.cpp: implementation of the CComboSkill class.//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "ComboSkill.h"
#include "SkillManager.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
void CComboSkill::Init() // OK
{
this->m_time = 0;
this->m_skill[0] = 0xFFFF;
this->m_skill[1] = 0xFFFF;
this->m_index = -1;
}
int CComboSkill::GetSkillType(WORD skill) // OK
{
if(skill == SKILL_FALLING_SLASH || skill == SKILL_LUNGE || skill == SKILL_UPPERCUT || skill == SKILL_CYCLONE || skill == SKILL_SLASH | Here you add any skill you like for example some DW skill or Elf triple shot skill from GS code skill list. )
{
return 0;
}
else if(skill == SKILL_TWISTING_SLASH || skill == SKILL_RAGEFUL_BLOW || skill == SKILL_DEATH_STAB || SKILL_FIRE_SLASH || skill == SKILL_FROZEN_STAB || skill == SKILL_BLOOD_STORM || Here you add skills 2nd and 3rd or what ever what need use to continue combo. )
{
return 1;
}
else
{
return -1;
}
}
bool CComboSkill::CheckCombo(WORD skill) // OK
{
int type = this->GetSkillType(skill);
if(type == -1)
{
this->Init();
return 0;
}
if(type == 0)
{
this->m_time = GetTickCount()+3000;
this->m_skill[0] = skill;
this->m_index = 0;
return 0;
}
if(type == 1)
{
if(this->m_time < GetTickCount())
{
this->Init();
return 0;
}
if(this->m_skill[0] == 0xFFFF)
{
this->Init();
return 0;
}
if(this->m_index == 0)
{
this->m_time = GetTickCount()+3000;
this->m_skill[1] = skill;
this->m_index = 1;
return 0;
}
if(this->m_index == 1 && this->m_skill[1] != skill)
{
this->Init();
return 1;
}
}
this->Init();
return 0;
}
If in 1st line add Lightening and in 2nd line add skills twister and flame, both, than DW can do combo with those skills.
I tried to add Marry command, but im getting this error -
Error 4 error C2065: 'COMMAND_MARRY' : undeclared identifier C:\DARBS\season 8\eMU\GameServer\GameServer\CommandManager.cpp 302 1 GameServer
Error 5 error C2051: case expression not constant C:\DARBS\season 8\eMU\GameServer\GameServer\CommandManager.cpp 302 1 GameServer
Where is my mistake?