绿色公益吧 关注:21贴子:92
  • 2回复贴,共1

嗨,欢迎来到本吧,您可以在此畅所欲言!

取消只看楼主收藏回复

嗨,欢迎来到本吧,您可以在此畅所欲言!嗨,欢迎来到本吧,您可以在此畅所欲言!
嗨,欢迎来到本吧,您可以在此畅所欲言!嗨,欢迎来到本吧,您可以在此畅所欲言!
嗨,欢迎来到本吧,您可以在此畅所欲言!嗨,欢迎来到本吧,您可以在此畅所欲言!
嗨,欢迎来到本吧,您可以在此畅所欲言!嗨,欢迎来到本吧,您可以在此畅所欲言!
嗨,欢迎来到本吧,您可以在此畅所欲言!嗨,欢迎来到本吧,您可以在此畅所欲言!
嗨,欢迎来到本吧,您可以在此畅所欲言!嗨,欢迎来到本吧,您可以在此畅所欲言!


IP属地:上海1楼2015-09-15 18:22回复
    123嗨,欢迎来到本吧,您可以在此畅所欲言!嗨,欢迎来到本吧,您可以在此畅所欲言!
    嗨,欢迎来到本吧,您可以在此畅所欲言!嗨,欢迎来到本吧,您可以在此畅所欲言!
    嗨,欢迎来到本吧,您可以在此畅所欲言!嗨,欢迎来到本吧,您可以在此畅所欲言!
    嗨,欢迎来到本吧,您可以在此畅所欲言!嗨,欢迎来到本吧,您可以在此畅所欲言!
    嗨,欢迎来到本吧,您可以在此畅所欲言!嗨,欢迎来到本吧,您可以在此畅所欲言!
    嗨,欢迎来到本吧,您可以在此畅所欲言!嗨,欢迎来到本吧,您可以在此畅所欲言!


    IP属地:上海2楼2015-09-15 18:23
    回复
      // RoyalRumble.cpp: implementation of the CRoyalRumble class.
      //
      //////////////////////////////////////////////////////////////////////
      #include "stdafx.h"
      #include "server.h"
      #include "RoyalRumble.h"
      #include "ServerDlg.h"
      #include "extern.h"
      #include "bufferex.h"
      #ifdef _DEBUG
      #undef THIS_FILE
      static char THIS_FILE[]=__FILE__;
      #define new DEBUG_NEW
      #endif
      extern CServerDlg *g_pMainDlg;
      extern CStringg_strARKRRWinner;
      //////////////////////////////////////////////////////////////////////
      // Construction/Destruction
      //////////////////////////////////////////////////////////////////////
      CRoyalRumble::CRoyalRumble()
      {
      m_iMaxApplyNum = 200;// 弥措 脚没 倾侩
      m_iMinLevel = 26;// 弥家 鞘夸 饭骇
      m_bRRStatus = RR_EMPTY;// 肺锯 烦喉狼 泅犁 惑怕
      m_iStartCount = 3;// 矫累矫俊 技林绰 墨款飘
      m_iPlayMinute = 30;// 肺锯 烦喉 版扁 矫埃(盒)
      m_iZoneNum = 59;// 肺锯 烦喉 俺弥 粮
      m_iBravoSecond = 60;// 版扁 饶 磊绵 矫埃(檬)
      m_bNextRRInit = FALSE;// 促澜 版扁甫 汲沥沁绰瘤俊 措茄 敲贰弊
      m_iItemSid = 840;// 惑前栏肺 林绰 酒捞袍狼 SID
      }
      CRoyalRumble::~CRoyalRumble()
      {
      m_bRRStatus = RR_EMPTY;
      for( int i = 0; i < m_arRRUser.GetSize(); i++ )
      {
      if( m_arRRUser[i] )
      {
      delete m_arRRUser[i];
      }
      }
      m_arRRUser.RemoveAll();
      }
      void CRoyalRumble::Init(int year, int month, int day)
      {
      MAP* pMap = NULL;
      for( int i = 0; i < g_zone.GetSize(); i++ )
      {
      if( g_zone[i] )
      {
      if( g_zone[i]->m_Zone == m_iZoneNum )
      {
      pMap = g_zone[i];
      break;
      }
      }
      }
      if( !pMap )// 肺凯烦喉 甘阑 救啊瘤绊 乐促. 檬扁拳 角菩
      {
      return;
      }
      m_pRRMap = pMap;
      m_iCurrentStartCount = m_iStartCount;
      m_bRRStatus = RR_IDLE;
      m_iCurrentPlaySecond = 0;
      m_iCurrentBravoSecond = 0;
      m_bNextRRInit = FALSE;
      // 脚没 啊瓷 矫埃
      m_timeApplyStart= CTime( year, month, day, 19, 0, 0 );
      m_timeApplyEnd= CTime( year, month, day, 19, 50, 0 );
      // 涝厘 啊瓷 矫埃
      m_timeEnterStart= CTime( year, month, day, 19, 50, 0 );
      m_timeEnterEnd= CTime( year, month, day, 20, 0, 0 );
      m_dwLastEnterMsg = GetTickCount();
      m_dwLastStartMsg = GetTickCount();
      m_ItemRR.sSid = m_iItemSid;
      m_ItemRR.sLevel= g_arItemTable[m_ItemRR.sSid]->m_byRLevel;
      m_ItemRR.sCount= 1;
      m_ItemRR.sDuration= g_arItemTable[m_ItemRR.sSid]->m_sDuration;
      m_ItemRR.sBullNum= g_arItemTable[m_ItemRR.sSid]->m_sBullNum;
      m_ItemRR.tMagic[0]= (BYTE)137;
      m_ItemRR.tMagic[1]= (BYTE)141;
      m_ItemRR.tMagic[2]= (BYTE)128;
      m_ItemRR.tMagic[3]= (BYTE)42;
      m_ItemRR.tMagic[4]= (BYTE)31;
      m_ItemRR.tMagic[5]= (BYTE)33;
      m_ItemRR.tIQ= UNIQUE_ITEM;
      m_ItemRR.iItemSerial= 0;
      m_ItemRR.dwMoney= 0;
      }
      void CRoyalRumble::CheckRRStatus()
      {
      CTime curTime = CTime::GetCurrentTime();
      CString strMsg;
      switch( m_bRRStatus )
      {
      /*caseRR_IDLE:// 泅犁 版扁啊 国绢瘤绊 乐瘤 臼促
      if( curTime >= m_timeApplyStart && curTime < m_timeApplyEnd )// 版扁 矫累 矫埃捞扼搁
      {
      m_bRRStatus = RR_APPLY;// 泅犁 惑怕甫 脚没惑怕肺 官操绊
      }
      break;
      */
      caseRR_EMPTY:// 捞辑滚绰 肺锯烦喉 措雀啊 绝促.
      break;
      caseRR_IDLE:// 泅犁 版扁啊 国绢瘤绊 乐瘤 臼促
      if( curTime >= m_timeEnterStart && curTime < m_timeEnterEnd )// 涝厘 矫埃捞扼搁
      {
      m_bRRStatus = RR_ENTERING;// 泅犁 惑怕甫 涝厘惑怕肺 官槽促
      break;
      }
      if( curTime >= m_timeApplyStart && curTime < m_timeApplyEnd )
      {
      Apply();
      }
      break;
      caseRR_ENTERING:
      if( curTime >= m_timeEnterEnd )
      {
      m_bRRStatus = RR_ENTERING_END;
      strMsg = _T("肺锯烦喉 拜捧啊 矫累邓聪促.");
      g_pMainDlg->AnnounceZone( (LPTSTR)(LPCTSTR)strMsg, SYSTEM_ANNOUNCE, m_iZoneNum );
      break;
      }
      if( GetTickCount() - m_dwLastEnterMsg > 2 * 60 * 1000 )
      {
      strMsg.Format( "肺凯烦喉俊 曼咯窍角 盒甸篮 %d矫 %02d盒 捞傈鳖瘤 版扁厘栏肺 涝厘秦林矫扁 官而聪促", m_timeEnterEnd.GetHour(), m_timeEnterEnd.GetMinute() );
      g_pMainDlg->AnnounceAllServer( (LPTSTR)(LPCTSTR)strMsg, SYSTEM_ANNOUNCE );
      m_dwLastEnterMsg = GetTickCount();
      }
      break;
      caseRR_ENTERING_END:
      CountDownStart();
      break;
      caseRR_START:
      if( GetTickCount() - m_dwLastStartMsg > 2 * 60 * 1000 )
      {
      strMsg = _T("泅犁 NEO A.R.K 拜捧厘俊辑 肺凯烦喉 拜捧啊 凯府绊 乐嚼聪促");
      g_pMainDlg->AnnounceAllServer( (LPTSTR)(LPCTSTR)strMsg, SYSTEM_ANNOUNCE );
      m_dwLastStartMsg = GetTickCount();
      }
      CheckRREnd();
      break;
      caseRR_END:
      CheckRRBravoEnd();
      break;
      }
      }
      void CRoyalRumble::CountDownStart()
      {
      if( m_bRRStatus != RR_ENTERING_END )
      {
      return;
      }
      if( m_iCurrentStartCount <= 0 && m_bRRStatus != RR_START )// 墨款飘甫 促 技菌绰单档 矫累登瘤 臼篮 惑炔
      {
      Start();
      return;
      }
      CString strMsg;
      if( m_iCurrentStartCount <= 0 )// 墨款飘甫 促 技菌促. 矫累 矫挪促.
      {
      m_bRRStatus = RR_START;
      m_iCurrentStartCount = m_iStartCount;
      Start();
      return;
      }
      strMsg.Format("%d", m_iCurrentStartCount );m_iCurrentStartCount--;
      g_pMainDlg->AnnounceZone( (LPTSTR)(LPCTSTR)strMsg, SYSTEM_ANNOUNCE, m_iZoneNum );
      }
      void CRoyalRumble::Start()
      {
      CString strMsg;
      strMsg = _T("矫累 !!!");
      g_pMainDlg->AnnounceZone( (LPTSTR)(LPCTSTR)strMsg, SYSTEM_ANNOUNCE, m_iZoneNum );


      IP属地:上海4楼2015-09-15 18:24
      回复