#include "stdafx.h"
//---------------------------------------------------------------------------
ObjUser gObjUser;
//---------------------------------------------------------------------------
WORD Buff_Class;
short Buff_Dexterity;
int Buff_GameState;
short Buff_AttackSpeed;
//---------------------------------------------------------------------------
void ObjUser::GetUserInfo()
{
_asm
{
mov esi, dword ptr ds:[oGameState]
mov Buff_GameState, esi
// ----
mov esi, dword ptr ds:[oObjUser]
// ----
mov dx, word ptr ds:[esi+oClass]
mov Buff_Class, dx
// ----
mov dx, word ptr ds:[esi+oDexterity]
mov Buff_Dexterity, dx
// ----
mov dx, word ptr ds:[esi+oAttackSpeed]
mov Buff_AttackSpeed, dx
}
// ----
this->SetUserInfo();
}
//---------------------------------------------------------------------------
void ObjUser::SetUserInfo()
{
this->Class = Buff_Class;
this->Dexterity = Buff_Dexterity;
this->AttackSpeed = Buff_AttackSpeed;
// --
this->GameState = Buff_GameState;
}
//---------------------------------------------------------------------------
void ObjUser::SetSpeedFrame()
{
switch(this->Class)
{
case ObjClass::DarkWizard: // [29.05.2012] Complete 100% -> 32000 Stats
case ObjClass::SoulMaster:
case ObjClass::GrandMaster:
{
if( this->AttackSpeed >= 455 && this->AttackSpeed <= 479 )
{
SetFloat((PVOID)oFrameSpeed2, 0.0024700);
}
else if( this->AttackSpeed >= 605 && this->AttackSpeed <= 636 )
{
SetFloat((PVOID)oFrameSpeed2, 0.0019000);
}
else if( this->AttackSpeed >= 637 && this->AttackSpeed <= 668 )
{
SetFloat((PVOID)oFrameSpeed2, 0.0018000);
}
else if( this->AttackSpeed >= 669 && this->AttackSpeed <= 688 )
{
SetFloat((PVOID)oFrameSpeed2, 0.0017000);
}
else if( this->AttackSpeed >= 855 && this->AttackSpeed <= 1040 )
{
SetFloat((PVOID)oFrameSpeed2, 0.0016300);
}
else if( this->AttackSpeed >= 1041 && this->AttackSpeed <= 1104 )
{
SetFloat((PVOID)oFrameSpeed2, 0.0015500);
}
else if( this->AttackSpeed >= 1301 && this->AttackSpeed <= 1500 )
{
SetFloat((PVOID)oFrameSpeed2, 0.0017500);
}
else if( this->AttackSpeed >= 1501 && this->AttackSpeed <= 1524 )
{
SetFloat((PVOID)oFrameSpeed2, 0.0015000);
}
else if( this->AttackSpeed >= 1525 && this->AttackSpeed <= 1800 )
{
SetFloat((PVOID)oFrameSpeed2, 0.0014500);
}
else if( this->AttackSpeed >= 1801 && this->AttackSpeed <= 1999 )
{
SetFloat((PVOID)oFrameSpeed2, 0.0013000);
}
else if( this->AttackSpeed >= 2000 && this->AttackSpeed <= 2167 )
{
SetFloat((PVOID)oFrameSpeed2, 0.0012500);
}
else if( this->AttackSpeed >= 2168 && this->AttackSpeed <= 2354 )
{
SetFloat((PVOID)oFrameSpeed2, 0.0011500);
}
else if( this->AttackSpeed >= 2855 && this->AttackSpeed <= 3011 )
{
SetFloat((PVOID)oFrameSpeed2, 0.0009000);
}
else if( this->AttackSpeed >= 3011 )
{
SetFloat((PVOID)oFrameSpeed2, 0.0008000);
}
else
{
SetFloat((PVOID)oFrameSpeed2, 0.0020000);
}
}
break;
// ----
case ObjClass::DarkKnight:
case ObjClass::BladeKnight:
case ObjClass::BladeMaster:
{
SetFloat((PVOID)oFrameSpeed, 0.0040000);
SetFloat((PVOID)oFrameSpeed2, 0.0020000);
}
break;
// ----
case ObjClass::Elf: // [30.05.2012] Complete 100% -> 32000 Stats
case ObjClass::MuseElf:
case ObjClass::HightElf:
{
if( this->AttackSpeed >= 509 && this->AttackSpeed <= 549 )
{
SetFloat((PVOID)oFrameSpeed, 0.0037000);
}
else
{
SetFloat((PVOID)oFrameSpeed, 0.0040000);
}
}
break;
// ----
case ObjClass::MagicGladiator:
case ObjClass::DuelMaster:
{
if(this->Dexterity >= 5700 && this->Dexterity <= 6550)
{
SetFloat((PVOID)oFrameSpeed2, 0.0020000);
}
else if(this->Dexterity >= 8200 && this->Dexterity <= 10700)
{
SetFloat((PVOID)oFrameSpeed2, 0.0020000);
}
else if(this->Dexterity >= 13250 && this->Dexterity <= 23250)
{
SetFloat((PVOID)oFrameSpeed2, 0.0020000);
}
else if(this->Dexterity >= 28250)
{
SetFloat((PVOID)oFrameSpeed2, 0.0006000);
}
else
{
SetFloat((PVOID)oFrameSpeed2, 0.0020000);
}
}
break;
// ----
case ObjClass::DarkLord:
case ObjClass::LordEmperor:
{
if(this->Dexterity >= 2000 && this->Dexterity < 4900)
{
SetFloat((PVOID)oFrameSpeed2, 0.0038000);
}
else if(this->Dexterity >= 4900 && this->Dexterity < 5050)
{
SetFloat((PVOID)oFrameSpeed2, 0.0037000);
}
else if(this->Dexterity >= 5050 && this->Dexterity < 5200)
{
SetFloat((PVOID)oFrameSpeed2, 0.0036000);
}
else if(this->Dexterity >= 5200 && this->Dexterity < 5350)
{
SetFloat((PVOID)oFrameSpeed2, 0.0035000);
}
else if(this->Dexterity >= 5350 && this->Dexterity < 5550)
{
SetFloat((PVOID)oFrameSpeed2, 0.0034000);
}
else if(this->Dexterity >= 5550 && this->Dexterity < 5700)
{
SetFloat((PVOID)oFrameSpeed2, 0.0033000);
}
else if(this->Dexterity >= 5700 && this->Dexterity < 5900)
{
SetFloat((PVOID)oFrameSpeed2, 0.0032000);
}
else if(this->Dexterity >= 5900 && this->Dexterity < 6100)
{
SetFloat((PVOID)oFrameSpeed2, 0.0031000);
}
else if(this->Dexterity >= 6100 && this->Dexterity < 6300)
{
SetFloat((PVOID)oFrameSpeed2, 0.0030000);
}
else if(this->Dexterity >= 6300 && this->Dexterity < 6500)
{
SetFloat((PVOID)oFrameSpeed2, 0.0029000);
}
else if(this->Dexterity >= 6500 && this->Dexterity < 6750)
{
SetFloat((PVOID)oFrameSpeed2, 0.0028000);
}
else if(this->Dexterity >= 6750 && this->Dexterity < 7000)
{
SetFloat((PVOID)oFrameSpeed2, 0.0027000);
}
else if(this->Dexterity >= 7000 && this->Dexterity < 7300)
{
SetFloat((PVOID)oFrameSpeed2, 0.0026000);
}
else if(this->Dexterity >= 7300 && this->Dexterity < 7600)
{
SetFloat((PVOID)oFrameSpeed2, 0.0025000);
}
else if(this->Dexterity >= 7600 && this->Dexterity < 7900)
{
SetFloat((PVOID)oFrameSpeed2, 0.0024000);
}
else if(this->Dexterity >= 7900 && this->Dexterity < 8250)
{
SetFloat((PVOID)oFrameSpeed2, 0.0023000);
}
else if(this->Dexterity >= 8250 && this->Dexterity < 8650)
{
SetFloat((PVOID)oFrameSpeed2, 0.0022000);
}
else if(this->Dexterity >= 8650 && this->Dexterity < 9050)
{
SetFloat((PVOID)oFrameSpeed2, 0.0021000);
}
else if(this->Dexterity >= 9050 && this->Dexterity < 9500)
{
SetFloat((PVOID)oFrameSpeed2, 0.0020000);
}
else if(this->Dexterity >= 9500 && this->Dexterity < 10000)
{
SetFloat((PVOID)oFrameSpeed2, 0.0019000);
}
else if(this->Dexterity >= 10000 && this->Dexterity < 10550)
{
SetFloat((PVOID)oFrameSpeed2, 0.0018000);
}
else if(this->Dexterity >= 10550 && this->Dexterity < 11150)
{
SetFloat((PVOID)oFrameSpeed2, 0.0017000);
}
else if(this->Dexterity >= 11150 && this->Dexterity < 11850)
{
SetFloat((PVOID)oFrameSpeed2, 0.0016000);
}
else if(this->Dexterity >= 11850 && this->Dexterity < 12600)
{
SetFloat((PVOID)oFrameSpeed2, 0.0015000);
}
else if(this->Dexterity >= 12600 && this->Dexterity < 13450)
{
SetFloat((PVOID)oFrameSpeed2, 0.0014000);
}
else if(this->Dexterity >= 13450 && this->Dexterity < 16600)
{
SetFloat((PVOID)oFrameSpeed2, 0.0010000);
}
else if(this->Dexterity >= 16600)
{
SetFloat((PVOID)oFrameSpeed2, 0.0008000);
}
else
{
SetFloat((PVOID)oFrameSpeed2, 0.0040000);
}
}
break;
}
}
//---------------------------------------------------------------------------