conditionpayplay.cpp

来自「dk1游戏的原代码文件,完整.编译系统redhat7.3,mysql 3.23 」· C++ 代码 · 共 90 行

CPP
90
字号
////////////////////////////////////////////////////////////////////////////////// Filename    : ConditionPayPlay.cpp// Written By  : // Description :////////////////////////////////////////////////////////////////////////////////#include "ConditionPayPlay.h"#include "PlayerCreature.h"#include "FlagSet.h"#include "PaySystem.h"#include "GamePlayer.h"#include "PacketUtil.h"#include "DB.h"////////////////////////////////////////////////////////////////////////////////// is satisfied?////////////////////////////////////////////////////////////////////////////////bool ConditionPayPlay::isSatisfied (Creature * pCreature1 , Creature * pCreature2, void* pParam) const 	throw () { 	Assert(pCreature2 != NULL);	Assert(pCreature2->isPC());#if defined(__PAY_SYSTEM_ZONE__) || defined(__PAY_SYSTEM_FREE_LIMIT__)	GamePlayer* pGamePlayer = dynamic_cast<GamePlayer*>(pCreature2->getPlayer());	Assert(pGamePlayer!=NULL);	// 捞固 蜡丰粮俊 乐绰 版快扼搁... 包拌绝摆瘤.	if (pGamePlayer->isPayPlaying() || pGamePlayer->isFamilyFreePass())	{		return true;	}	// 老窜 zone 夸陛 眉农	//return pGamePlayer->hasPayPlayFlag(PAY_PLAY_FLAG_ZONE)	string connectIP = pGamePlayer->getSocket()->getHost();		if (pGamePlayer->loginPayPlay(connectIP, pGamePlayer->getID()))	{		sendPayInfo(pGamePlayer);		return true;	}	else	{		return false;	}#else	return true;#endif}//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void ConditionPayPlay::read (PropertyBuffer & propertyBuffer) 	throw (Error){	/*	try	{		// read turn		m_Index = propertyBuffer.getPropertyInt("Index");	}	catch (NoSuchElementException & nsee)	{		throw Error(nsee.toString());	}	*/}////////////////////////////////////////////////////////////////////////////////	// get debug string////////////////////////////////////////////////////////////////////////////////string ConditionPayPlay::toString () const 	throw () { 	__BEGIN_TRY	StringStream msg;	msg << "ConditionPayPlay("//		<< "Index:" << (int)m_Index		<< ")"; 	return msg.toString();	__END_CATCH}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?