conditionentercastledungeon.cpp
来自「dk1游戏的原代码文件,完整.编译系统redhat7.3,mysql 3.23 」· C++ 代码 · 共 131 行
CPP
131 行
////////////////////////////////////////////////////////////////////////////////// Filename : ConditionEnterCastleDungeon.cpp// Written By : // Description :////////////////////////////////////////////////////////////////////////////////#include "ConditionEnterCastleDungeon.h"#include "PlayerCreature.h"#include "FlagSet.h"#include "Zone.h"#include "PaySystem.h"#include "WarSystem.h"#include "PacketUtil.h"#include "GamePlayer.h"#include "CastleInfoManager.h"////////////////////////////////////////////////////////////////////////////////// is satisfied?////////////////////////////////////////////////////////////////////////////////bool ConditionEnterCastleDungeon::isSatisfied (Creature * pCreature1 , Creature * pCreature2, void* pParam) const throw () { /*if (!g_pVariableManager->isActiveHolyLand()) { return false; }*/ // 唱吝俊 傈里吝牢瘤 眉农秦具 等促 Assert(pCreature2 != NULL); Assert(pCreature2->isPC()); //cout << "Condition: EnterCastleDungeon" << endl; bool bPayPlay = false; GamePlayer* pGamePlayer = dynamic_cast<GamePlayer*>(pCreature2->getPlayer()); Assert(pGamePlayer!=NULL);#if defined(__PAY_SYSTEM_ZONE__) || defined(__PAY_SYSTEM_FREE_LIMIT__) // 捞固 蜡丰粮俊 乐绰 版快扼搁... 包拌绝摆瘤. // 菩剐府 夸陛力 利侩吝老 版快 if (pGamePlayer->isPayPlaying() || pGamePlayer->isFamilyFreePass()) { bPayPlay = true; } else { // 老窜 zone 夸陛 眉农 string connectIP = pGamePlayer->getSocket()->getHost(); if (pGamePlayer->loginPayPlay(connectIP, pGamePlayer->getID())) { sendPayInfo(pGamePlayer); bPayPlay = true; } }#else bPayPlay = true;#endif // 捣 辰 荤恩父 castle 俊 甸绢哎 荐 乐促. if (bPayPlay) { bool hasGuildWar = g_pWarSystem->hasCastleActiveWar( m_CastleZoneID ); CastleInfo* pCastleInfo = g_pCastleInfoManager->getCastleInfo( m_CastleZoneID ); Assert(pCastleInfo!=NULL); PlayerCreature* pPC = dynamic_cast<PlayerCreature*>(pCreature2); Assert(pPC!=NULL); GuildID_t GuildID = pPC->getGuildID(); GuildID_t OwnerGuildID = pCastleInfo->getGuildID(); // 傈里捞 绝阑 锭 --> 己 家蜡 辨靛父 甸绢哎 荐 乐促. // 辨靛 傈里 吝 --> 傍拜 辨靛档 甸绢哎 荐 乐促. if ( OwnerGuildID!=SlayerCommon && OwnerGuildID!=VampireCommon && OwnerGuildID!=OustersCommon && GuildID==OwnerGuildID) { return true; } if (hasGuildWar) { GuildID_t AttackGuildID; g_pWarSystem->getAttackGuildID( m_CastleZoneID, AttackGuildID ); if (GuildID==AttackGuildID) { return true; } } } return false;}//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void ConditionEnterCastleDungeon::read (PropertyBuffer & propertyBuffer) throw (Error){ try { // read turn m_CastleZoneID = propertyBuffer.getPropertyInt("CastleZoneID"); } catch (NoSuchElementException & nsee) { throw Error(nsee.toString()); }}////////////////////////////////////////////////////////////////////////////////// get debug string////////////////////////////////////////////////////////////////////////////////string ConditionEnterCastleDungeon::toString () const throw () { __BEGIN_TRY StringStream msg; msg << "ConditionEnterCastleDungeon(" << "CastleZoneID:" << (int)m_CastleZoneID << ")"; return msg.toString(); __END_CATCH}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?