actionstashsell.cpp

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

CPP
105
字号
////////////////////////////////////////////////////////////////////////////////// Filename    : ActionStashSell.cpp// Written By  : // Description :////////////////////////////////////////////////////////////////////////////////#include "ActionStashSell.h"#include "Creature.h"#include "Slayer.h"#include "Vampire.h"#include "Ousters.h"#include "PriceManager.h"#include "Gpackets/GCStashSell.h"#include "GamePlayer.h"////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////void ActionStashSell::read (PropertyBuffer & propertyBuffer)    throw (Error){    __BEGIN_TRY 	__END_CATCH}////////////////////////////////////////////////////////////////////////////////// 咀记阑 角青茄促.////////////////////////////////////////////////////////////////////////////////void ActionStashSell::execute (Creature * pCreature1 , Creature * pCreature2) 	throw (Error){	__BEGIN_TRY 	Assert(pCreature1 != NULL);	Assert(pCreature2 != NULL);	Assert(pCreature1->isNPC());	Assert(pCreature2->isPC());	Price_t     price;	BYTE        curStashNum;	GCStashSell pkt;	if (pCreature2->isSlayer())	{		// 泅犁 啊瘤绊 乐绰 焊包窃狼 肮荐肺 促澜 焊包窃狼 蔼阑 沥茄促.		curStashNum = dynamic_cast<Slayer*>(pCreature2)->getStashNum();		if (curStashNum < STASH_RACK_MAX)		{			price = g_pPriceManager->getStashPrice(curStashNum+1);		}		else price = 0;	}	else if (pCreature2->isVampire())	{		// 泅犁 啊瘤绊 乐绰 焊包窃狼 肮荐肺 促澜 焊包窃狼 蔼阑 沥茄促.		curStashNum = dynamic_cast<Vampire*>(pCreature2)->getStashNum();		if (curStashNum < STASH_RACK_MAX)		{			price = g_pPriceManager->getStashPrice(curStashNum+1);		}		else price = 0;	}	else if (pCreature2->isOusters())	{		// 泅犁 啊瘤绊 乐绰 焊包窃狼 肮荐肺 促澜 焊包窃狼 蔼阑 沥茄促.		curStashNum = dynamic_cast<Ousters*>(pCreature2)->getStashNum();		if (curStashNum < STASH_RACK_MAX)		{			price = g_pPriceManager->getStashPrice(curStashNum+1);		}		else price = 0;	}	// 菩哦俊促 蔼阑 技泼秦 霖促.	pkt.setPrice(price);	Player* pPlayer = pCreature2->getPlayer();	Assert(pPlayer != NULL);	pPlayer->sendPacket(&pkt);	__END_CATCH}////////////////////////////////////////////////////////////////////////////////// get debug string////////////////////////////////////////////////////////////////////////////////string ActionStashSell::toString () const 	throw (){	__BEGIN_TRY	StringStream msg;	msg << "ActionStashSell(" << ")";	return msg.toString();	__END_CATCH}

⌨️ 快捷键说明

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