📄 partyiconmanager.cpp
字号:
// PartyIconManager.cpp: implementation of the PartyIconManager class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "PartyIconManager.h"
#include "GameIn.h"
#include "MiniMapDlg.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
GLOBALTON(CPartyIconManager)
CPartyIconManager::CPartyIconManager()
{
// memset(m_MInfoIndex, 0, sizeof(DWORD)*(MAX_PARTY_LISTNUM-1));
// memset(m_MoveInfo, 0, sizeof(PartyIconMoveInfo)*(MAX_PARTY_LISTNUM-1));
}
CPartyIconManager::~CPartyIconManager()
{
for(int i=0; i<MAX_PARTY_LISTNUM-1; i++)
{
m_MInfoIndex[i] = 0;
}
}
void CPartyIconManager::CreatePartyIcon(DWORD ID, PARTY_MEMBER* pMember)
{
// 扁粮俊 捞固 乐阑版快浚 困摹父 荐沥秦霖促.
for(int i=0; i<MAX_PARTY_LISTNUM-1; i++)
{
if(m_MInfoIndex[i] == ID)
{
GAMEIN->GetMiniMapDialog()->SetPartyIconObjectPos(ID, pMember->posX, pMember->posZ);
m_MoveInfo[i].SetPosition(pMember->posX, pMember->posZ);
m_MoveInfo[i].SetIconPosition(pMember->posX, pMember->posZ);
return;
}
}
// 绝栏搁 货肺 眠啊秦霖促.
for(i=0; i<MAX_PARTY_LISTNUM-1; i++)
{
if(m_MInfoIndex[i] == 0)
{
m_MInfoIndex[i] = ID;
// Icon 檬扁困摹 汲沥
GAMEIN->GetMiniMapDialog()->AddPartyMemberIcon(pMember);
GAMEIN->GetMiniMapDialog()->SetPartyIconObjectPos(ID, pMember->posX, pMember->posZ);
m_MoveInfo[i].SetPosition(pMember->posX, pMember->posZ);
m_MoveInfo[i].SetIconPosition(pMember->posX, pMember->posZ);
break;
}
}
}
void CPartyIconManager::DeletePartyIcon(DWORD ID)
{
for(int i=0; i<MAX_PARTY_LISTNUM-1; i++)
{
if(m_MInfoIndex[i] == ID)
{
GAMEIN->GetMiniMapDialog()->RemoveIcon(ID);
m_MInfoIndex[i] = 0;
m_MoveInfo[i].Reset();
}
}
}
void CPartyIconManager::DeleteAllPartyIcon()
{
for(int i=0; i<MAX_PARTY_LISTNUM-1; i++)
{
if(m_MInfoIndex[i])
{
GAMEIN->GetMiniMapDialog()->RemoveIcon(m_MInfoIndex[i]);
m_MInfoIndex[i] = 0;
m_MoveInfo[i].Reset();
}
}
}
void CPartyIconManager::SetMoveInfo(PARTYICON_MOVEINFO* pMoveInfo)
{
for(int i=0; i<MAX_PARTY_LISTNUM-1; i++)
{
if(m_MInfoIndex[i] == pMoveInfo->dwMoverID)
{
m_MoveInfo[i].SetMoveInfo(pMoveInfo);
break;
}
}
}
void CPartyIconManager::SetCurPosition(DWORD ID, MoveCoord Pos)
{
for(int i=0; i<MAX_PARTY_LISTNUM-1; i++)
{
if(m_MInfoIndex[i] == ID)
{
m_MoveInfo[i].SetPosition(Pos.posX, Pos.posZ);
m_MoveInfo[i].SetIconPosition(Pos.posX, Pos.posZ);
m_MoveInfo[i].Reset();
GAMEIN->GetMiniMapDialog()->SetPartyIconObjectPos(ID, Pos.posX, Pos.posZ);
}
}
}
void CPartyIconManager::SetKyungGong(DWORD ID, int Index)
{
for(int i=0; i<MAX_PARTY_LISTNUM-1; i++)
{
if(m_MInfoIndex[i] == ID)
{
m_MoveInfo[i].SetKoungGongIdx(Index);
break;
}
}
}
void CPartyIconManager::SetMoveState(DWORD ID, int State)
{
for(int i=0; i<MAX_PARTY_LISTNUM-1; i++)
{
if(m_MInfoIndex[i] == ID)
{
m_MoveInfo[i].SetMoveState(State);
break;
}
}
}
/*
void CPartyIconManager::MoveStop(DWORD ID)
{
for(int i=0; i<MAX_PARTY_LISTNUM-1; i++)
{
if(m_MInfoIndex[i] == ID)
{
m_MoveInfo[i].MoveStop();
break;
}
}
}
*/
void CPartyIconManager::Process()
{
for(int i=0; i<MAX_PARTY_LISTNUM-1; i++)
{
if(m_MInfoIndex[i])
{
m_MoveInfo[i].Process();
GAMEIN->GetMiniMapDialog()->SetPartyIconTargetPos(m_MInfoIndex[i],
m_MoveInfo[i].GetIconPos().posX, m_MoveInfo[i].GetIconPos().posZ);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -