Bienvenido a Next Games
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.
Bienvenido a Next Games

Bienvenido a Next Games, en este foro podras encontrar ayuda para los mejores juegos on-line!
 
ÍndiceBuscarÚltimas imágenesRegistrarseConectarse

 

 [FIX] Hammer Stripping

Ir abajo 
AutorMensaje
juan249
Administrador
Administrador
juan249


Cantidad de envíos : 68
Fecha de inscripción : 08/01/2008

[FIX] Hammer Stripping Empty
MensajeTema: [FIX] Hammer Stripping   [FIX] Hammer Stripping Icon_minitimeJue 10 Ene 2008, 21:34

Este code arregla el Hammer Stripping que algunas veces, esta demaciado alto.

HGSources. Game.cpp. Buscar:

Código:
void CGame::CalculateEnduranceDecrement(short sTargetH, short sAttackerH, char cTargetType, int iArmorType)

Reemplazar toda la funcion por:

Código:
void CGame::CalculateEnduranceDecrement(short sTargetH, short sAttackerH, char cTargetType, int iArmorType)
{
short sItemIndex;
int iDownValue = 1, iHammerChance = 100;

if (m_pClientList[sTargetH] == NULL) return;

if ((cTargetType == DEF_OWNERTYPE_PLAYER) && (m_pClientList[sAttackerH] != NULL )) {
if ((cTargetType == DEF_OWNERTYPE_PLAYER) && (m_pClientList[sTargetH]->m_cSide != m_pClientList[sAttackerH]->m_cSide)) {
switch (m_pClientList[sAttackerH]->m_sUsingWeaponSkill) {
case 14:
if ((31 == ((m_pClientList[sAttackerH]->m_sAppr2 & 0x0FF0) >> 4)) || (32 == ((m_pClientList[sAttackerH]->m_sAppr2 & 0x0FF0) >> 4))) {
sItemIndex = m_pClientList[sAttackerH]->m_sItemEquipmentStatus[DEF_EQUIPPOS_TWOHAND];
if ((sItemIndex != -1) && (m_pClientList[sAttackerH]->m_pItemList[sItemIndex] != NULL)) {
if (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 761) { // BattleHammer
iDownValue = 10;
break;
}
if (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 762) { // GiantBattleHammer
iDownValue = 10;
break;
}
if (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 843) { // BarbarianHammer
iDownValue = 10;
break;
}
}
}
else {
iDownValue = 20; break;
}
case 10: iDownValue = 3; break;
default: iDownValue = 1; break;
}

if (m_pClientList[sTargetH]->m_bIsSpecialAbilityEnabled == TRUE) {
switch (m_pClientList[sTargetH]->m_iSpecialAbilityType)
case 52: iDownValue = 0; iHammerChance = 0;
}
}
}

if ((m_pClientList[sTargetH]->m_cSide != 0) && (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan > 0)) {
m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan -= iDownValue;
}

if ((m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan <= 0) || (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan > 64000)) {
m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan = 0;
SendNotifyMsg(NULL, sTargetH, DEF_NOTIFY_ITEMLIFESPANEND, m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_cEquipPos, iArmorType, NULL, NULL);
ReleaseItemHandler(sTargetH, iArmorType, TRUE);
return;
}

try
{
if (m_pClientList[sAttackerH] != NULL) {
if (cTargetType == DEF_OWNERTYPE_PLAYER) {
sItemIndex = m_pClientList[sAttackerH]->m_sItemEquipmentStatus[DEF_EQUIPPOS_TWOHAND];
if ((sItemIndex != -1) && (m_pClientList[sAttackerH]->m_pItemList[sItemIndex] != NULL)) {
if ((m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 617) || (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 618) || (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 619) || (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 873) || (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 874) || (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 75) || (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 76)) {
m_pClientList[sAttackerH]->m_sUsingWeaponSkill = 6;
return;
}
}
}
}

if (m_pClientList[sAttackerH] != NULL) {
if (cTargetType == DEF_OWNERTYPE_PLAYER) {
if ((m_pClientList[sAttackerH]->m_sUsingWeaponSkill == 14) && (iHammerChance == 100)) {
if (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wMaxLifeSpan < 2000) {
iHammerChance = iDice(6, (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wMaxLifeSpan - m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan));
}
else {
iHammerChance = iDice(4, (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wMaxLifeSpan - m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan));
}

if ((31 == ((m_pClientList[sAttackerH]->m_sAppr2 & 0x0FF0) >> 4)) || (32 == ((m_pClientList[sAttackerH]->m_sAppr2 & 0x0FF0) >> 4))) {
sItemIndex = m_pClientList[sAttackerH]->m_sItemEquipmentStatus[DEF_EQUIPPOS_TWOHAND];
if ((sItemIndex != -1) && (m_pClientList[sAttackerH]->m_pItemList[sItemIndex] != NULL)) {
if (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 761) { // BattleHammer
iHammerChance = ((iHammerChance*10)/5);
}
if (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 762) { // GiantBattleHammer
iHammerChance = ((iHammerChance*10)/4);
}
if (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 843) { // GiantBattleHammer
iHammerChance = ((iHammerChance*10)/5);
}
}
}
if ((m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_sIDnum == 622) || (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_sIDnum == 621)) {
iHammerChance = 0;
}
if (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan < iHammerChance) {
wsprintf(G_cTxt, "(iHammerChance (%d), target armor endurance (%d)!", iHammerChance, m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan);
PutLogList(G_cTxt);
ReleaseItemHandler(sTargetH, iArmorType, TRUE);
SendNotifyMsg(NULL, sTargetH, DEF_NOTIFY_ITEMRELEASED, m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_cEquipPos, iArmorType, NULL, NULL);
return;
}
}
}
}
}
catch(...)
{

}
}
Volver arriba Ir abajo
https://nextgames.forosactivos.net
 
[FIX] Hammer Stripping
Volver arriba 
Página 1 de 1.

Permisos de este foro:No puedes responder a temas en este foro.
Bienvenido a Next Games :: Helbreath :: Sources :: Fixeds-
Cambiar a: