|
@@ -238,7 +238,7 @@ SRAND(80,120);
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- bool CAction::IsBattle()
|
|
|
+ bool CAction::IsFighting()
|
|
|
{
|
|
|
CRect rc;
|
|
|
SRAND(100, 200);
|
|
@@ -480,11 +480,45 @@ SRAND(80,120);
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- void CAction::BattleJY(BOOL bHasSummoner, int nZJType, BOOL bAggressiveSkill)
|
|
|
+ bool CAction::IsSPBelowSafeValue(BOOL IsRole, int nSafeValue /*= 30*/)
|
|
|
+ {
|
|
|
+ RECT rect = { 0,0,0,0 };
|
|
|
+ if (IsFighting())
|
|
|
+ {
|
|
|
+ rect = IsRole ? RECT{ 0, 0, 0, 0 } : RECT{ 0, 0, 0, 0 };
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ rect = IsRole ? RECT{ 0, 0, 0, 0 } : RECT{ 0, 0, 0, 0 };
|
|
|
+ }
|
|
|
+
|
|
|
+ // 截图;
|
|
|
+ TCHAR szSPImg[MAX_PATH] = {0};
|
|
|
+ _stprintf_s(szSPImg, _T("%s%p_SPValue.bmp"), GameGlobal::g_szTempDir, m_hGameWnd);
|
|
|
+ ImgAssist::CropPicture(m_hGameWnd, rect, szSPImg);
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ bool CAction::IsHPBelowSafeValue(BOOL IsRole, int nSafeValue /*= 30*/)
|
|
|
+ {
|
|
|
+ if (IsFighting())
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ void CAction::FightingJY(BOOL bHasSummoner, int nZJType, BOOL bAggressiveSkill)
|
|
|
{
|
|
|
BOOL bFirstAttack = TRUE;
|
|
|
// 1.是否在战斗中;
|
|
|
- while (IsBattle()) {
|
|
|
+ while (IsFighting()) {
|
|
|
// 2.是否我方攻击;
|
|
|
while (IsWattingAttack(0)) { // Bug:如果被镜妖打死了,无法中断;
|
|
|
DebugLog(_T("BattleJY:我方攻击……"));
|
|
@@ -630,7 +664,7 @@ SRAND(80,120);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- void CAction::BattleYS(LPCTSTR lpszSkillName)
|
|
|
+ void CAction::FightingYS(LPCTSTR lpszSkillName)
|
|
|
{
|
|
|
CRect rc;
|
|
|
BOOL bBattle = FALSE;
|
|
@@ -765,7 +799,7 @@ SRAND(80,120);
|
|
|
// 将鼠标移动到指定位置;
|
|
|
POINT ptDest = { 625, 28 }; // 左上角;
|
|
|
MouseMove(ptDest);
|
|
|
- while (IsBattle())
|
|
|
+ while (IsFighting())
|
|
|
{
|
|
|
// 判断是否我方攻击;
|
|
|
if (IsWattingAttack(1))
|
|
@@ -787,7 +821,7 @@ SRAND(80,120);
|
|
|
MouseRClick();
|
|
|
}
|
|
|
|
|
|
- void CAction::BattleOthers(LPCTSTR lpszName, LPCTSTR lpszSkillName)
|
|
|
+ void CAction::FightingOthers(LPCTSTR lpszName, LPCTSTR lpszSkillName)
|
|
|
{
|
|
|
CRect rc;
|
|
|
BOOL bBattle = FALSE;
|
|
@@ -818,7 +852,7 @@ SRAND(80,120);
|
|
|
// 将鼠标移动到指定位置;
|
|
|
POINT ptDest = { 625, 28 }; // 左上角;
|
|
|
MouseMove(ptDest);
|
|
|
- while (IsBattle())
|
|
|
+ while (IsFighting())
|
|
|
{
|
|
|
// 判断是否我方攻击;
|
|
|
if (IsWattingAttack(1))
|
|
@@ -997,7 +1031,7 @@ SRAND(80,120);
|
|
|
// 将鼠标移动到指定位置;
|
|
|
POINT ptDest = { 625, 28 }; // 左上角;
|
|
|
MouseMove(ptDest);
|
|
|
- while (IsBattle())
|
|
|
+ while (IsFighting())
|
|
|
{
|
|
|
// 判断是否我方攻击;
|
|
|
if (IsWattingAttack(1))
|
|
@@ -1044,7 +1078,7 @@ SRAND(80,120);
|
|
|
// 将鼠标移动到指定位置;
|
|
|
POINT ptDest = { 625, 28 }; // 左上角;
|
|
|
MouseMove(ptDest);
|
|
|
- while (IsBattle())
|
|
|
+ while (IsFighting())
|
|
|
{
|
|
|
// 判断是否我方攻击;
|
|
|
if (IsWattingAttack(1))
|
|
@@ -1114,7 +1148,7 @@ SRAND(80,120);
|
|
|
do
|
|
|
{
|
|
|
DebugLog(_T("start.打镜妖 %d----------------------------"), i);
|
|
|
- pThis->BattleJY(pThis->m_bHasSummoner, pThis->m_nSummonerSkillType, pThis->m_bTargetOfRoleSkill);
|
|
|
+ pThis->FightingJY(pThis->m_bHasSummoner, pThis->m_nSummonerSkillType, pThis->m_bTargetOfRoleSkill);
|
|
|
DebugLog(_T("end.打镜妖 %d----------------------------\n"), i++);
|
|
|
} while (WaitForSingleObject(pThis->m_hBattleJYEvent, 200) == WAIT_TIMEOUT);
|
|
|
|