
Source Combo Skill Para SSEMU y MueMu
Source Combo Skill Para SSEMU y MuEmu
SkillManager.cpp – Función CSkillManager::UseDurationSkillAttack
La función CSkillManager::UseDurationSkillAttack gestiona la lógica cuando un personaje utiliza una habilidad de duración, como un buff o un ataque continuo. Este tipo de habilidades son cruciales en juegos como MuOnline, donde la estrategia y el manejo de recursos son fundamentales para el éxito del jugador.
En el contexto de SSEMU y MuEmu, esta función se convierte en un elemento esencial para asegurar que las habilidades se ejecuten correctamente, optimizando así la experiencia del jugador. A continuación, se presentan algunos aspectos clave de la implementación de esta función:
#if(COMBO_1SKILL)
void CSkillManager::UseDurationSkillAttack(int aIndex, int bIndex, CSkill* lpSkill, BYTE x, BYTE y, BYTE dir, BYTE angle) {
LPOBJ lpObj = &gObj[aIndex];
- #if(COMBO_1SKILL): Esta es una directiva de preprocesador que indica que el bloque de código solo se compilará si la macro COMBO_1SKILL está definida. Esto permite incluir o excluir características durante la compilación.
- LPOBJ lpObj = &gObj[aIndex];: Esta línea obtiene un puntero al arreglo gObj, que contiene todos los objetos del juego, utilizando aIndex para acceder al objeto del personaje que está usando la habilidad.
La verificación de requisitos es esencial para el uso eficaz de habilidades. Por ejemplo, se verifica si el usuario es un personaje y si tiene el arma adecuada para usar la habilidad. Si no cumple con los requisitos, la función retorna sin ejecutar la habilidad.
if (lpObj->Type == OBJECT_USER && this->CheckSkillRequireWeapon(lpObj, lpSkill->m_skill) == 0) {
return;
}
Enlaces Internos
- Skin Season 20 Part 2 – 7th Guardian Taurus Pets
- Plugin Sistema de Guías v1.0.0 – Free WebEngine 1.2.0
- Takumi12 S6 Source UP15 Repack for Beginner v0.3.4
- New Damage Numbers Skin Made by TheRoyal
Enlaces Externos
La implementación de habilidades también incluye un sistema de combo que permite a los jugadores activar habilidades especiales basadas en probabilidades. Este sistema, denominado ComBo1Skill, puede ser habilitado o deshabilitado, proporcionando flexibilidad a los desarrolladores de servidores privados como MuEmu y SSeMu.
En resumen, la función CSkillManager::UseDurationSkillAttack es fundamental para el manejo de habilidades en juegos MMORPG como MuOnline. Su correcta implementación asegura que las habilidades se utilicen de manera efectiva, mejorando la jugabilidad y la satisfacción del usuario.
ServerInfo.h
#if(COMBO_1SKILL) int ComBo1Skill; int TyleComBo1Skill; #endif
- Este archivo de encabezado declara dos variables enteras, ComBo1Skill y TyleComBo1Skill, dentro de la clase ServerInfo. Estas variables solo se incluyen si COMBO_1SKILL está definido.
- ComBo1Skill: Probablemente un indicador para habilitar o deshabilitar el sistema de combo personalizado.
- TyleComBo1Skill: Representa el porcentaje de probabilidad de que una habilidad active un efecto de «Combo 1 Habilidad».
ServerInfo.cpp
#if(COMBO_1SKILL) this->ComBo1Skill = GetPrivateProfileInt(section, "ComBo1Skill", 0, path); this->TyleComBo1Skill = GetPrivateProfileInt(section, "TyleComBo1Skill", 0, path); #endif
- Este código se encarga de cargar los valores de ComBo1Skill y TyleComBo1Skill desde un archivo de configuración.
stdafx.h
#define COMBO_1SKILL 1
SkillManager.cpp
#if(COMBO_1SKILL)
void CSkillManager::UseDurationSkillAttack(int aIndex, int bIndex, CSkill* lpSkill, BYTE x, BYTE y, BYTE dir, BYTE angle) // OK
{
LPOBJ lpObj = &gObj[aIndex];
if (lpObj->Type == OBJECT_USER && this->CheckSkillRequireWeapon(lpObj, lpSkill->m_skill) == 0)
{
return;
}
if (lpObj->Type == OBJECT_USER && lpSkill->m_skill == SKILL_TWISTING_SLASH && lpObj->Inventory[0].IsItem() == 0)
{
return;
}
#if(FIX_TELE_KHONG_DUNG_SKILL)
//============ Fix Tele ==========//
//fix tele dung skill
if (lpObj->Type == OBJECT_USER && lpObj->Class == CLASS_DW)
{
int skill = ((lpSkill == 0) ? SKILL_NONE : lpSkill->m_skill);
if (lpObj->Teleport != 0){
return;
}
}
//============ Fix Tele ==========//
#endif
//bool combo = 0;
bool checkCombo = false;
bool combo = false;
if (gServerInfo.ComBo1Skill == 1)
{
long random = GetLargeRand() % 100;
if (random < gServerInfo.TyleComBo1Skill)
{
checkCombo = true;
}
}
else
{
checkCombo = lpObj->ComboSkill.CheckCombo(lpSkill->m_skill);
}
if (lpSkill->m_skill != SKILL_FLAME && lpSkill->m_skill != SKILL_TWISTER && lpSkill->m_skill != SKILL_EVIL_SPIRIT && lpSkill->m_skill != SKILL_HELL_FIRE && lpSkill->m_skill != SKILL_AQUA_BEAM && lpSkill->m_skill != SKILL_BLAST && lpSkill->m_skill != SKILL_INFERNO && lpSkill->m_skill != SKILL_TRIPLE_SHOT && lpSkill->m_skill != SKILL_IMPALE && lpSkill->m_skill != SKILL_MONSTER_AREA_ATTACK && lpSkill->m_skill != SKILL_PENETRATION && lpSkill->m_skill != SKILL_FIRE_SLASH && lpSkill->m_skill != SKILL_FIRE_SCREAM)
{
//if((gServerInfo.m_EnableComboToAllSwitch == 1 || gQuest.CheckQuestListState(lpObj,3,QUEST_FINISH) != 0) && lpObj->ComboSkill.CheckCombo(lpSkill->m_skill) != 0)
if ((gServerInfo.m_EnableComboToAllSwitch == 1 || gQuest.CheckQuestListState(lpObj, 3, QUEST_FINISH) != 0) && checkCombo)
{
if (gServerInfo.m_CheckAutoComboHack == 0 || (GetTickCount() - lpObj->ComboTime) > ((DWORD)gServerInfo.m_CheckAutoComboHackTolerance))
{
combo = 1;
lpObj->ComboTime = GetTickCount();
}
}
}
if (lpObj->SkillNovaState != 0 && lpSkill->m_skill != SKILL_NOVA && this->GetSkill(lpObj, SKILL_NOVA) != 0)
{
this->RunningSkill(aIndex, 0, this->GetSkill(lpObj, SKILL_NOVA), x, y, 0, combo);
return;
}
this->GCDurationSkillAttackSend(lpObj, lpSkill->m_index, x, y, dir);
if (lpObj->Type != OBJECT_USER || (this->CheckSkillMana(lpObj, lpSkill->m_index) != 0 && this->CheckSkillBP(lpObj, lpSkill->m_index) != 0))
{
if (this->RunningSkill(aIndex, bIndex, lpSkill, x, y, angle, combo) != 0 && lpObj->Type == OBJECT_USER)
{
lpObj->Mana -= ((this->GetSkillMana(lpSkill->m_index)*lpObj->MPConsumptionRate) / 100);
lpObj->BP -= ((this->GetSkillBP(lpSkill->m_index)*lpObj->BPConsumptionRate) / 100);
GCManaSend(aIndex, 0xFF, (int)lpObj->Mana, lpObj->BP);
}
}
}
#endif
Serverinfo.cpp
#if(COMBO_1SKILL)
this->ComBo1Skill = GetPrivateProfileInt(section, "ComBo1Skill", 0, path);
this->TyleComBo1Skill = GetPrivateProfileInt(section, "TyleComBo1Skill", 0, path);
#endif
Serverinfo.h
#if(COMBO_1SKILL)
int ComBo1Skill;
int TyleComBo1Skill;
#endif
GameServerInfo – Skill
;================================================== ; Combo 1 Skill ;================================================== ComBo1Skill = 1 TyleComBo1Skill = 10 ;==================================================
Resumen
Este código implementa un sistema personalizado de «Combo 1 Habilidad» para un servidor privado de MuOnline, mejorando la jugabilidad y ofreciendo a los jugadores nuevas estrategias en el uso de habilidades.
You may also like
Archivos
Calendar
| L | M | X | J | V | S | D |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |


Deja un comentario