-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathComboAttack.cpp
More file actions
122 lines (106 loc) · 1.83 KB
/
ComboAttack.cpp
File metadata and controls
122 lines (106 loc) · 1.83 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#include "stdafx.h"
#include "ComboAttack.h"
#include "user.h"
// GS-N 0.99.60T 0x004A42C0 : Completed
// GS-N 1.00.18 JPN 0x004C2270 - Completed
CComboAttack gComboAttack;
CComboAttack::CComboAttack()
{
return;
}
CComboAttack::~CComboAttack()
{
return;
}
int CComboAttack::GetSkillPos(int skillnum)
{
switch (skillnum)
{
case 19:
case 20:
case 21:
case 22:
case 23:
return 0;
break;
case 455:
case 456:
case 457:
case 458:
case 459:
case 495:
case 496:
case 497:
case 498:
case 499:
case 41:
case 42:
case 465:
case 466:
case 467:
case 468:
case 469:
case 43:
case 460:
case 461:
case 462:
case 463:
case 464:
case 232:
return 1;
break;
default:
return -1;
break;
}
}
BOOL CComboAttack::CheckCombo(int aIndex, int skillnum)
{
LPOBJ lpObj = &gObj[aIndex];
if ( lpObj->ComboSkillquestClear != false )
{
int sp = this->GetSkillPos(skillnum);
if ( sp == 0 )
{
lpObj->comboSkill.ProgressIndex = 0;
lpObj->comboSkill.dwTime = GetTickCount() + 3000;
lpObj->comboSkill.Skill[0] = skillnum;
}
else if ( sp == 1 )
{
if ( lpObj->comboSkill.Skill[0] == 0xFF )
{
lpObj->comboSkill.Init();
return 0;
}
//int Time =GetTickCount();
if (lpObj->comboSkill.dwTime < GetTickCount() )
{
lpObj->comboSkill.Init();
return 0;
}
if ( lpObj->comboSkill.ProgressIndex == 0 )
{
lpObj->comboSkill.ProgressIndex = 1;
lpObj->comboSkill.dwTime = GetTickCount() + 3000;
lpObj->comboSkill.Skill[1] = skillnum;
}
else if ( lpObj->comboSkill.Skill[1] != skillnum )
{
lpObj->comboSkill.Init();
return 1;
}
else
{
lpObj->comboSkill.Init();
}
}
else
{
lpObj->comboSkill.ProgressIndex= -1;
lpObj->comboSkill.dwTime = 0;
lpObj->comboSkill.Skill[0] = -1;
}
}
return 0;
}