• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ seqDebug函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中seqDebug函数的典型用法代码示例。如果您正苦于以下问题:C++ seqDebug函数的具体用法?C++ seqDebug怎么用?C++ seqDebug使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了seqDebug函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: findSpell

void SpellShell::action(const uint8_t* data, size_t, uint8_t)
{
  const actionStruct* a = (const actionStruct*)data;

  if (a->type != 0xe7) // only things to do if action is a spell
    return;

  const Item* s;
  QString targetName;

  if (a->target && 
      ((s = m_spawnShell->findID(tSpawn, a->target))))
    targetName = s->name();

  SpellItem *item = findSpell(a->spell, a->target, targetName);

  if (item || (a->target == m_player->id()))
  {
    int duration = 0;
    const Spell* spell = m_spells->spell(a->spell);
    if (spell)
      duration = spell->calcDuration(a->level) * 6;
    
    QString casterName;
    if (a->source && 
	((s = m_spawnShell->findID(tSpawn, a->source))))
      casterName = s->name();

    if (item)
    {
#ifdef DIAG_SPELLSHELL
      seqDebug("action - found - source=%d (lvl: %d) cast id=%d on target=%d causing %d damage", 
	       a->source, a->level, a->spell, a->target, a->damage);
#endif // DIAG_SPELLSHELL
      
      item->update(a->spell, spell, duration, 
		   a->source, casterName, a->target, targetName);
      emit changeSpell(item);
    }
    else
    {
      // otherwise check for spells cast on us
#ifdef DIAG_SPELLSHELL
      seqDebug("action - new - source=%d (lvl: %d) cast id=%d on target=%d causing %d damage", 
	       a->source, a->level, a->spell, a->target, a->damage);
#endif // DIAG_SPELLSHELL
      
      // only way to get here is if there wasn't an existing spell, so...
      item = new SpellItem();
      item->update(a->spell, spell, duration, 
		   a->source, casterName, a->target, targetName);
      m_spellList.append(item);
      if ((m_spellList.count() > 0) && (!m_timer->isActive()))
	m_timer->start(1000 *
		       pSEQPrefs->getPrefInt("SpellTimer", "SpellList", 6));
      emit addSpell(item);
    }    
  }
}
开发者ID:xbackupx,项目名称:showeqx,代码行数:59,代码来源:spellshell.cpp


示例2: seqDebug

void CombatWindow::addMobRecord(int iTargetID, int iSourceID, int iDamage, QString tName, QString sName)
{
#ifdef DEBUGCOMBAT
	seqDebug("CombatWindow::addMobRecord starting...");
#endif

	int iTimeNow = mTime();
	int iPlayerID = m_player->id();
	int iMobID;
	QString mobName;

	if(iPlayerID == iTargetID)
	{
		iMobID = iSourceID;
		mobName = sName;
	}
	else if(iPlayerID == iSourceID)
	{
		iMobID = iTargetID;
		mobName = tName;
	}
	else
	{
		//invalid record
		return;
	}


	bool bFoundRecord = false;

	CombatMobRecord *pRecord;

	for(pRecord = m_combat_mob_list.first(); pRecord != 0; pRecord = m_combat_mob_list.next())
	{
		if(pRecord->getID() == iMobID)
		{
			bFoundRecord = true;
			break;
		}
	}

	if(!bFoundRecord)
	{
		pRecord = new CombatMobRecord(iMobID, iTimeNow, m_player);
		pRecord->setName(mobName);
		m_combat_mob_list.append(pRecord);
	}
	pRecord->setTime(time(0));
	pRecord->addHit(iTargetID, iSourceID, iDamage);


#ifdef DEBUGCOMBAT
	seqDebug("CombatWindow::addMobRecord finished...");
#endif
}
开发者ID:xbackupx,项目名称:showeqx,代码行数:55,代码来源:combatlog.cpp


示例3: seqDebug

void FilteredSpawnModel::setCategory(const Category* category)
{
    m_currentCategory = category;

    if (category != NULL)
        seqDebug("[fsm] changed category: %s", (const char*)category->name());
    else
        seqDebug("[fsm] changed category: <none>");

    invalidateFilter();
}
开发者ID:brainiac,项目名称:showeq,代码行数:11,代码来源:filteredspawnmodel.cpp


示例4: seqDebug

////////////////////////////////////////////////////
// decrypt/uncompress packet
uint8_t* EQPacketStream::decodeOpCode(uint8_t *data, size_t *len, 
				      uint16_t& opCode)
{
  bool s_encrypt = opCode & FLAG_CRYPTO;
  bool compressed = opCode & FLAG_COMP;

  if (s_encrypt)
  {
    if (!m_validKey)
      return NULL;
    
#ifdef PACKET_DECODE_DIAG
    seqDebug("decoding 0x%04x with 0x%08llx on stream %s", opCode, m_decodeKey, EQStreamStr[m_streamid]);
#endif
    
    int64_t offset = (m_decodeKey % 5) + 5;
    *((int64_t *)(data+offset)) ^= m_decodeKey;
    m_decodeKey ^= *((int64_t *)(data+offset));
    m_decodeKey += *len;
  }
  
  if (compressed)
  {
    static uint8_t decompressed[200000];
    size_t dcomplen = 199998;
    uint32_t retval;
    
    retval = uncompress(decompressed, (uLongf*)&dcomplen, data, (*len));
    if (retval != 0)
    {
      if (s_encrypt) 
      {
	seqWarn("Lost sync, relog or zone to reset");
	m_validKey = false;
      }
      
      seqWarn("uncompress failed on 0x%04x: %d - %s\nno further attempts will be made until zone on stream %s.", 
	      opCode, retval, zError(retval), EQStreamStr[m_streamid]);
      return NULL;
    }
    
#ifdef PACKET_DECODE_DIAG
    seqDebug ("clean uncompress of 0x%04fx on stream %s: %s", opCode, zError (retval), EQStreamStr[m_streamid]);
#endif 

    opCode &= ~FLAG_COMP;
    if (s_encrypt) 
      opCode &= ~FLAG_CRYPTO;
    data = decompressed;
    *len = dcomplen;
  }

  return data;
}
开发者ID:xbackupx,项目名称:showeqx,代码行数:56,代码来源:packetstream.cpp


示例5: seqDebug

//slot for loading buffs when main char struct is loaded
void SpellShell::buffLoad(const spellBuff* c)
{
#ifdef DIAG_SPELLSHELL
  seqDebug("Loading buff - id=%d.",c->spellid);
#endif // DIAG_SPELLSHELL

  const Spell* spell = m_spells->spell(c->spellid);
  int duration = c->duration * 6;
  SpellItem *item = findSpell(c->spellid, m_player->id(), m_player->name());
  if (item) 
  { // exists
    item->update(c->spellid, spell, duration, 
		 0, "Buff", m_player->id(), m_player->name());
    emit changeSpell(item);
  } 
  else 
  { // new spell
    item = new SpellItem();
    item->update(c->spellid, spell, duration, 
		 0, "Buff", m_player->id(), m_player->name());
    m_spellList.append(item);
    if ((m_spellList.count() > 0) && (!m_timer->isActive()))
      m_timer->start(1000 *
		     pSEQPrefs->getPrefInt("SpellTimer", "SpellList", 6));
    emit addSpell(item);
  }
}
开发者ID:xbackupx,项目名称:showeqx,代码行数:28,代码来源:spellshell.cpp


示例6: seqDebug

void SpawnShell::zoneEntry(const uint8_t* data)
{
    const spawnStruct* spawn = (const spawnStruct*)data;

#ifdef SPAWNSHELL_DIAG
    seqDebug("SpawnShell::zoneEntry(spawnStruct *(name='%s'))", spawn->name);
#endif

    // Zone Entry. This is a semi-filled in spawnStruct that we
    // see for ourself when entering a zone. We also get sent this
    // when shrouding and when respawning from corpse hover mode. Auras
    // also get sent this sometimes.
    if (spawn->NPC == 0)
    {
        // Align the player instance with these values
        m_player->update(spawn);

        emit changeItem(m_player, tSpawnChangedALL);
    }
    else
    {
        // Auras.
        newSpawn(data);
    }
}
开发者ID:xbackupx,项目名称:showeqx,代码行数:25,代码来源:spawnshell.cpp


示例7: seqDebug

void FilterItem::init(const QString& regexString, bool caseSensitive, 
        uint8_t minLevel, uint8_t maxLevel)
{
  m_minLevel = minLevel;
  m_maxLevel = maxLevel;

#ifdef DEBUG_FILTER
  seqDebug("regexString=%s minLevel=%d maxLevel=%d", 
	 (const char*)regexString, minLevel, maxLevel);
#endif

  m_regexp.setWildcard(false);
  m_regexp.setCaseSensitive(caseSensitive);

  // For the pattern, save off the original. This is what will be saved
  // during save operations. But the actual regexp we filter with will
  // mark the # in spawn names as optional to aid in filter writing.
  m_regexpOriginalPattern = QString(regexString.ascii());

  QString fixedFilterPattern = regexString;
  fixedFilterPattern.replace("Name:", "Name:#?", false);
  m_regexp.setPattern(fixedFilterPattern);

  if (!m_regexp.isValid())
  {
    seqWarn("Filter Error: '%s' - %s",
	    (const char*)m_regexp.pattern(), 
	    (const char*)m_regexp.errorString());
  }
}
开发者ID:carriercomm,项目名称:showeq,代码行数:30,代码来源:filter.cpp


示例8: switch

void CombatDefenseRecord::addMiss(int iMissReason)
{
	m_iTotalAttacks++;

	switch (iMissReason)
	{
		case COMBAT_MISS:
			m_iMisses++;
			break;

		case COMBAT_BLOCK:
			m_iBlocks++;
			break;

		case COMBAT_PARRY:
			m_iParries++;
			break;

		case COMBAT_RIPOSTE:
			m_iRipostes++;
			break;

		case COMBAT_DODGE:
			m_iDodges++;
			break;

		default:
#ifdef DEBUGCOMBAT
			seqDebug("CombatDefenseRecord::addMiss:WARNING: invalid miss reason");
#endif
			break;
	}
}
开发者ID:brainiac,项目名称:showeq,代码行数:33,代码来源:combatlog.cpp


示例9: seqDebug

void CombatWindow::initUI()
{
#ifdef DEBUGCOMBAT
	seqDebug("CombatWindow::initUI: starting...");
#endif

	m_tab = new QTabWidget();

	m_offenseTab = initOffenseWidget();
	m_tab->addTab(m_offenseTab, "&Offense");

	m_defenseTab = initDefenseWidget();
	m_tab->addTab(m_defenseTab, "&Defense");

	m_mobTab = initMobWidget();
	m_tab->addTab(m_mobTab, "&Mobs");

	//m_menuBar = new QMenuBar(this);
	//m_clearMenu = new Q3PopupMenu(this);
	//m_clearMenu->insertItem("Clear Offense Stats", this, SLOT(clearOffense()));
	//m_clearMenu->insertItem("Clear Mob Stats", this, SLOT(clearMob()));
	//m_menuBar->insertItem("&Clear", m_clearMenu);

	//QPushButton* m_clearButton = new QPushButton("Clear");
	//connect(m_clearButton, SIGNAL(clicked()), this, SLOT(clearOffense()));
	//connect(m_clearButton, SIGNAL(clicked()), this, SLOT(clearMob()));

	//QVBoxLayout* mainLayout = new QVBoxLayout();
	//mainLayout->addWidget(m_tab);
	//mainLayout->addWidget(m_clearButton);

	updateOffense();
	updateDefense();
	updateMob();

	//QWidget* layoutWidget = new QWidget();
	//layoutWidget->setLayout(mainLayout);
	//setWidget(layoutWidget);
	setWidget(m_tab);

#ifdef DEBUGCOMBAT
	seqDebug("CombatWindow::initUI: finished...");
#endif
}
开发者ID:brainiac,项目名称:showeq,代码行数:44,代码来源:combatlog.cpp


示例10: seqDebug

////////////////////////////////////////////////////
// setCache 
// adds current packet to specified cache
void EQPacketStream::setCache(uint16_t serverArqSeq, EQProtocolPacket& packet)
{
   // check if the entry already exists in the cache
   EQPacketMap::iterator it = m_cache.find(serverArqSeq);

   if (it == m_cache.end())
   {
   // entry doesn't exist, so insert an entry into the cache

#ifdef PACKET_PROCESS_DIAG
      seqDebug("SEQ: Insert arq (%04x) stream %d into cache", serverArqSeq, m_streamid);
#endif

      m_cache.insert(EQPacketMap::value_type(serverArqSeq, 
         new EQProtocolPacket(packet, true)));
      emit cacheSize(m_cache.size(), (int)m_streamid);
   }
   else
   {
     // replacing an existing entry, make sure the new data is valid
#ifdef APPLY_CRC_CHECK
     if (! packet.hasCRC() || calculateCRC(packet) == packet.crc())
#endif
     {
#ifdef PACKET_PROCESS_DIAG
        seqDebug("SEQ: Update arq (%04x) stream %d in cache", serverArqSeq, m_streamid);
#endif

        // Free the old packet at this place and replace with the new one.
        delete it->second;
        it->second = new EQProtocolPacket(packet, true);
     }
#if defined(PACKET_PROCESS_DIAG) && defined(APPLY_CRC_CHECK)
     else
        seqDebug("SEQ: Not Updating arq (%04x) stream %d into cache, CRC error!",
               serverArqSeq, m_streamid);
#endif
   }

#ifdef PACKET_CACHE_DIAG
   if (m_cache.size() > m_maxCacheCount)
      m_maxCacheCount = m_cache.size();
#endif // PACKET_CACHE_DIAG
}
开发者ID:xbackupx,项目名称:showeqx,代码行数:47,代码来源:packetstream.cpp


示例11: seqDebug

bool EQPacketDispatch::connect(const QObject* receiver, const char* member)
{
#ifdef PACKET_DISPATCH_DIAG
  seqDebug("Connecting '%s:%s' to '%s:%s' objects %s.",
	  className(), name(), receiver->className(), receiver->name(),
	  (const char*)member);
#endif

  return QObject::connect((QObject*)this, 
			  SIGNAL(signal(const uint8_t*, size_t, uint8_t)),
			  receiver, member);
}
开发者ID:xbackupx,项目名称:showeqx,代码行数:12,代码来源:packetinfo.cpp


示例12: dateFormat

void GuildMember::update(const GuildMemberUpdate* gmu)
{
  m_zoneId = gmu->zoneId;
  m_zoneInstance = gmu->zoneInstance;
  m_lastOn = gmu->lastOn;
#ifdef GUILDSHELL_DIAG
  QDateTime dt;
  QString dateFormat("ddd MMM dd hh:mm:ss yyyy");
  dt.setTime_t(m_lastOn);

  QString zone;
  zone = QString::number(m_zoneId);
  if (zoneInstance())
    zone += ":" + QString::number(m_zoneInstance);

  seqDebug("GuildShell: updated zone for member (member: %s, zone: %s, last on: %s", (const char*) m_name, (const char*) zone, (const char*) dt.toString(dateFormat));
#endif
}
开发者ID:xbackupx,项目名称:showeqx,代码行数:18,代码来源:guildshell.cpp


示例13: debug

///////////////////////////////////////////
//EQPacket::dispatchWorldChatData  
// note this dispatch gets just the payload
void EQPacket::dispatchWorldChatData (size_t len, uint8_t *data, 
				      uint8_t dir)
{
#ifdef DEBUG_PACKET
  debug ("dispatchWorldChatData()");
#endif /* DEBUG_PACKET */
  if (len < 10)
    return;
  
  uint16_t opCode = eqntohuint16(data);

  switch (opCode)
  {
  default:
    seqDebug("%04x - %d (%s)", opCode, len,
	    ((dir == DIR_Server) ? 
	     "WorldChatServer --> Client" : "Client --> WorldChatServer"));
  }
}
开发者ID:xbackupx,项目名称:showeqx,代码行数:22,代码来源:packet.cpp


示例14: FilterItem

//
// addFilter
//
// Add a filter to the list
//
bool 
Filter::addFilter(const QString& filterPattern)
{
  FilterItem* re;

  // no duplicates allowed
  if (findFilter(filterPattern))
    return false;

  re = new FilterItem(filterPattern, m_caseSensitive);

  // append it to the end of the list
  m_filterItems.append(re);

#ifdef DEBUG_FILTER
  seqDebug("Added Filter '%s'", (const char*)filterPattern);
#endif

 return re->valid(); 
} // end addFilter
开发者ID:carriercomm,项目名称:showeq,代码行数:25,代码来源:filter.cpp



注:本文中的seqDebug函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ seqInfo函数代码示例发布时间:2022-05-30
下一篇:
C++ seprintf函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap