本文整理汇总了C++中CCrywolfUtil::SendCrywolfUserAnyData方法的典型用法代码示例。如果您正苦于以下问题:C++ CCrywolfUtil::SendCrywolfUserAnyData方法的具体用法?C++ CCrywolfUtil::SendCrywolfUserAnyData怎么用?C++ CCrywolfUtil::SendCrywolfUserAnyData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCrywolfUtil
的用法示例。
在下文中一共展示了CCrywolfUtil::SendCrywolfUserAnyData方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NotifyCrywolfStageEffectOnOff
void CCrywolf::NotifyCrywolfStageEffectOnOff(BYTE btOnOff)
{
PMSG_ANS_CRYWOLF_STAGE_EFFECT_ONOFF pMsg = {0};
PHeadSubSetB((LPBYTE)&pMsg, 0xBD, 0x06, sizeof(pMsg));
pMsg.btStageEffectOnOff = btOnOff;
UTIL.SendCrywolfUserAnyData((LPBYTE)&pMsg,sizeof(pMsg));
}
示例2: NotifyCrywolfCurrentState
void CCrywolf::NotifyCrywolfCurrentState()
{
PMSG_ANS_CRYWOLF_INFO pMsg = {0};
PHeadSubSetB((LPBYTE)&pMsg, 0xBD, 0x00, sizeof(pMsg));
pMsg.btOccupationState = this->GetOccupationState();
pMsg.btCrywolfState = this->GetCrywolfState();
UTIL.SendCrywolfUserAnyData((LPBYTE)&pMsg,sizeof(pMsg));
LogAdd( "[ Crywolf ] SetState - StateInfo : Occupation/%d, State/%d",
pMsg.btOccupationState, pMsg.btCrywolfState);
}
示例3: NotifyCrywolfHeroList
void CCrywolf::NotifyCrywolfHeroList()
{
char cBUFFER[6000];
int iHeroCount = 0;
memset(cBUFFER, 0, sizeof(cBUFFER));
PMSG_ANS_CRYWOLF_HERO_LIST_INFO_COUNT * lpMsg = (PMSG_ANS_CRYWOLF_HERO_LIST_INFO_COUNT *)cBUFFER;
PMSG_ANS_CRYWOLF_HERO_LIST_INFO * lpMsgBody = (PMSG_ANS_CRYWOLF_HERO_LIST_INFO *)(cBUFFER + 5);
std::set<LPOBJ,CCrywolfScoreSort> HeroSet;
for (int i=OBJ_STARTUSERINDEX;i<OBJMAX;i++)
{
if ( gObj[i].Connected == PLAYER_PLAYING &&
gObj[i].Type == OBJ_USER &&
gObj[i].MapNumber == MAP_INDEX_CRYWOLF_FIRSTZONE)
{
HeroSet.insert(&gObj[i]);
}
}
std::set<LPOBJ, CCrywolfScoreSort>::iterator _Itor = HeroSet.begin();
for(int j=0;j<5&& _Itor != HeroSet.end();j++, _Itor++)
{
LPOBJ lpHeroObj = (*(_Itor));
lpMsgBody[j].iRank = iHeroCount;
lpMsgBody[j].btHeroClass = (BYTE)lpHeroObj->Class;
lpMsgBody[j].iHeroScore = lpHeroObj->m_iCrywolfMVPScore;
memcpy(lpMsgBody[j].szHeroName, lpHeroObj->Name, MAX_ACCOUNT_LEN);
iHeroCount++;
LogAdd("[ Crywolf ][Hero List] [%s][%s] Score(%d) Ranking(%d)",
lpHeroObj->AccountID, lpHeroObj->Name, lpHeroObj->m_iCrywolfMVPScore, iHeroCount);
if ( this->GetOccupationState() != 1 )
{
if ( lpMsgBody[j].iRank <= 5 )
{
this->MakeRewardForHeroListTop5(lpHeroObj->m_Index);
}
}
}
lpMsg->btCount = iHeroCount;
PHeadSubSetB((LPBYTE)lpMsg, 0xBD, 0x08, iHeroCount*sizeof(PMSG_ANS_CRYWOLF_HERO_LIST_INFO) + sizeof(PMSG_ANS_CRYWOLF_HERO_LIST_INFO_COUNT));
UTIL.SendCrywolfUserAnyData((LPBYTE)lpMsg, lpMsg->h.size);
}
示例4: NotifyCrywolfBossMonsterInfo
void CCrywolf::NotifyCrywolfBossMonsterInfo()
{
static DWORD dwTickCount = 0;
if ( (GetTickCount() - dwTickCount) < 5000 )
return;
dwTickCount = GetTickCount();
PMSG_ANS_CRYWOLF_BOSSMONSTER_INFO pMsg;
PHeadSubSetB((LPBYTE)&pMsg, 0xBD, 0x05, sizeof(pMsg));
pMsg.iMonster1HP = -1;
pMsg.btMonster2 = 0;
int tmp=0;
#if (MP==1)
#pragma omp parallel for reduction(+:tmp)
#endif
for ( int i=0;i<OBJ_MAXMONSTER;i++)
{
if (!gObjIsConnected(i))
continue;
if ( gObj[i].MapNumber != MAP_INDEX_CRYWOLF_FIRSTZONE )
continue;
if ( !gObj[i].Live )
continue;
switch ( gObj[i].Class )
{
case 340:
tmp++;
break;
case 349:
pMsg.iMonster1HP = int((gObj[i].Life * 100.0) / (gObj[i].MaxLife + 1.0));
break;
}
}
pMsg.btMonster2=tmp;
UTIL.SendCrywolfUserAnyData((LPBYTE)&pMsg,sizeof(pMsg));
LogAdd("[ Crywolf ][Boss Monster Info] Balgas HP:%d, DarkElf:%d",
pMsg.iMonster1HP, pMsg.btMonster2);
}
示例5: NotifyCrywolfStateLeftTime
void CCrywolf::NotifyCrywolfStateLeftTime()
{
static DWORD dwTickCount = 0;
if ( (GetTickCount() - dwTickCount) < 20000 )
return;
dwTickCount = GetTickCount();
PMSG_ANS_CRYWOLF_LEFTTIME pMsg = {0};
PHeadSubSetB((LPBYTE)&pMsg, 0xBD, 0x04, sizeof(pMsg));
pMsg.btHour = ( ( this->m_StateTimeInfo[this->GetCrywolfState()].GetLeftTime() / 1000 ) / 60 ) / 24;
pMsg.btMinute = ( ( this->m_StateTimeInfo[this->GetCrywolfState()].GetLeftTime() / 1000 ) / 60 );
UTIL.SendCrywolfUserAnyData((LPBYTE)&pMsg,sizeof(pMsg));
LogAdd( "[ Crywolf ] War LeftTime - (%02d:%02d)",
pMsg.btHour, pMsg.btMinute);
}
示例6: NotifyCrywolfStatueAndAltarInfo
void CCrywolf::NotifyCrywolfStatueAndAltarInfo()
{
static DWORD dwTickCount = 0;
if ( (GetTickCount() - dwTickCount) < 2000 )
return;
dwTickCount = GetTickCount();
PMSG_ANS_CRYWOLF_STATUE_ALTAR_INFO pMsg;
PHeadSubSetB((LPBYTE)&pMsg, 0xBD, 0x02, sizeof(pMsg));
pMsg.iCrywolfStatueHP = g_CrywolfNPC_Statue.m_Shield.GetHPPercentage();
pMsg.btAltarState1 = g_CrywolfNPC_Altar.GetAltarRemainContractCount(205);
pMsg.btAltarState2 = g_CrywolfNPC_Altar.GetAltarRemainContractCount(206);
pMsg.btAltarState3 = g_CrywolfNPC_Altar.GetAltarRemainContractCount(207);
pMsg.btAltarState4 = g_CrywolfNPC_Altar.GetAltarRemainContractCount(208);
pMsg.btAltarState5 = g_CrywolfNPC_Altar.GetAltarRemainContractCount(209);
pMsg.btAltarState1 |= g_CrywolfNPC_Altar.GetAltarState(205) << 4;
pMsg.btAltarState2 |= g_CrywolfNPC_Altar.GetAltarState(206) << 4;
pMsg.btAltarState3 |= g_CrywolfNPC_Altar.GetAltarState(207) << 4;
pMsg.btAltarState4 |= g_CrywolfNPC_Altar.GetAltarState(208) << 4;
pMsg.btAltarState5 |= g_CrywolfNPC_Altar.GetAltarState(209) << 4;
UTIL.SendCrywolfUserAnyData((LPBYTE)&pMsg,sizeof(pMsg));
LogAdd("[ Crywolf ][Statue Info] Statue HP : %d",
pMsg.iCrywolfStatueHP);
for ( int iAltar = 205 ; iAltar <= 209 ; iAltar ++ )
{
int iUserIndex = g_CrywolfNPC_Altar.GetAltarUserIndex(iAltar);
if ( iUserIndex != -1 )
{
LogAdd("[ Crywolf ][Altar Info] Altar(%d) Contractor: [%s][%s] ",
iAltar, gObj[iUserIndex].AccountID, gObj[iUserIndex].Name);
}
}
}