Autor Topic: Combo All Class for MuEmu  (Visto 228 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline djagripnos on: July 01, 2018, 04:24:39 PM

  • *
  • Rank: Puto amo
  • Posts: 337
  • Gracias recibida: 7034
Combo Skill.cpp, SkillManager.cpp, SkillManager.h
Download 3 files

Citar
#include "stdafx.h"
#include "ComboSkill.h"
#include "SkillManager.h"


//////////////////////////////////////////////////////////////////////


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             ||
        skill == SKILL_FIRE_SLASH        ||
        skill == SKILL_TWISTER           ||
        skill == SKILL_POWER_SLASH       ||
        skill == SKILL_FLAME             ||
        skill == SKILL_DRAIN_LIFE        ||
        skill == SKILL_TRIPLE_SHOT       ||
        skill == SKILL_UPPER_BEAST       ||
        skill == SKILL_PHOENIX_SHOT      ||
        skill == SKILL_LARGE_RING_BLOWER ||
        skill == SKILL_FIRE_BURST
        )
    {
        return 0;
    }
    else if(skill == SKILL_TWISTING_SLASH ||
        skill == SKILL_RAGEFUL_BLOW       ||
        skill == SKILL_DEATH_STAB         ||
        skill == SKILL_FROZEN_STAB        ||
        skill == SKILL_BLOOD_STORM        ||
        skill == SKILL_LIGHTNING          ||
        skill == SKILL_DECAY              ||
        skill == SKILL_HELL_FIRE          ||
        skill == SKILL_INFERNO            ||
        skill == SKILL_RED_STORM          ||
        skill == SKILL_CHAIN_LIGHTNING    ||
        skill == SKILL_FIVE_SHOT          ||
        skill == SKILL_PENETRATION        ||
        skill == SKILL_DRAGON_LORE        ||
        skill == SKILL_CHAIN_DRIVER       ||
        skill == SKILL_FIRE_SCREAM        ||
        skill == SKILL_BIRDS
        )
    {
        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;
}

« Ultima edicion: July 01, 2018, 04:28:57 PM by djagripnos »

Online ZabiinoOo #1 on: July 01, 2018, 06:11:32 PM

  • Administrador
  • *
  • Rank: Puto amo
  • Posts: 3774
  • Gracias recibida: 36266



Prohibido pedir soporte via MP
Leer las reglas de cada seccion

Gracias:


Offline seedmaker #2 on: July 01, 2018, 09:37:46 PM

  • *
  • Rank: Dedicado
  • Posts: 43
  • Gracias recibida: 59

Offline BlackWizard #3 on: July 02, 2018, 02:27:08 AM

  • *
  • Rank: Dedicado
  • Posts: 31
  • Gracias recibida: 5
Alguien puede explicar el tema?

Offline Linch #4 on: July 02, 2018, 04:00:46 PM

  • *
  • Rank: Avanzado
  • Posts: 124
  • Gracias recibida: 155
Que tal, me encuentro muy confundido por falta de experencia para manejar semejantes archivos, muchos diran que me puede llegar a de faltar mucho por aprender, la pregunta es, quien ayudara a enteder el mismo ?, saludos :D.

Online sombe30 #5 on: July 02, 2018, 04:02:15 PM

  • Colaborador
  • *
  • Rank: Experto
  • Posts: 167
  • Gracias recibida: 826
se agrega al sources del gameserver

Gracias:


 

Related Topics

  Subject / Started by Replies Last post
9 Replies
336 Views
Last post July 01, 2017, 02:16:38 PM
by ZabiinoOo
0 Replies
434 Views
Last post July 04, 2017, 04:33:59 PM
by Azzlaer
4 Replies
898 Views
Last post July 05, 2017, 08:23:50 AM
by Marote
64 Replies
5581 Views
Last post May 27, 2018, 12:46:39 PM
by zodiacddos
1 Replies
177 Views
Last post April 23, 2018, 04:44:40 AM
by trucoder22