当前位置: 首页>>代码示例>>C++>>正文


C++ P_CHAR::IsMurderer方法代码示例

本文整理汇总了C++中P_CHAR::IsMurderer方法的典型用法代码示例。如果您正苦于以下问题:C++ P_CHAR::IsMurderer方法的具体用法?C++ P_CHAR::IsMurderer怎么用?C++ P_CHAR::IsMurderer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在P_CHAR的用法示例。


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

示例1: deadattack

void deadattack (NXWSOCKET  s, CHARACTER i)
{
	CHARACTER cc = currchar[s];
	P_CHAR pc = MAKE_CHAR_REF( cc );
	VALIDATEPC( pc );
	P_CHAR pc_other = MAKE_CHAR_REF( i );
	VALIDATEPC( pc_other );

	if(pc_other->npc)
	{
		if(pc_other->npcaitype==NPCAI_HEALER)
		{
			if( pc->IsInnocent() )
			{
				if ( pc->distFrom( pc_other ) <= 3 )
				{//let's resurrect him!
					pc_other->playAction(0x10);
					pc->resurrect();
					staticeffect(cc, 0x37, 0x6A, 0x09, 0x06);
					switch(RandomNum(0, 4))
					{
					case 0: pc_other->talkAll( TRANSLATE("Thou art dead, but 'tis within my power to resurrect thee.  Live!"),0); break;
					case 1: pc_other->talkAll( TRANSLATE("Allow me to resurrect thee ghost.  Thy time of true death has not yet come."),0); break;
					case 2: pc_other->talkAll( TRANSLATE("Perhaps thou shouldst be more careful.  Here, I shall resurrect thee."),0); break;
					case 3: pc_other->talkAll( TRANSLATE("Live again, ghost!  Thy time in this world is not yet done."),0); break;
					case 4: pc_other->talkAll( TRANSLATE("I shall attempt to resurrect thee."),0); break;
					}
				}
				else
				{//if dist>3
					pc_other->talkAll( TRANSLATE("Come nearer, ghost, and i'll give you life!"),1);
				}
			}
			else
			{//if a bad guy
				pc_other->talkAll( TRANSLATE("I will not give life to a scoundrel like thee!"),1);
			}
		}
		else if( pc_other->npcaitype == NPCAI_EVILHEALER )
		{
			if( pc->IsMurderer())
			{
				if ( pc->distFrom( pc_other ) <=3 )
				{//let's resurrect him!
					pc_other->playAction(0x10);
					pc->resurrect();
					staticeffect(cc, 0x37, 0x09, 0x09, 0x19); //Flamestrike effect
					switch(rand()%5)
					{
						case 0: pc_other->talkAll( TRANSLATE("Fellow minion of Mondain, Live!!"),0); break;
						case 1: pc_other->talkAll( TRANSLATE("Thou has evil flowing through your vains, so I will bring you back to life."),0); break;
						case 2: pc_other->talkAll( TRANSLATE("If I res thee, promise to raise more hell!."),0); break;
						case 3: pc_other->talkAll( TRANSLATE("From hell to Britannia, come alive!."),0); break;
						case 4: pc_other->talkAll( TRANSLATE("Since you are Evil, I will bring you back to consciouness."),0); break;
					}
				}
				else
				{//if dist >3
					pc_other->talkAll( TRANSLATE("Come nearer, evil soul, and i'll give you life!"),1);
				}
			}
			else
			{//if player is a good guy
				pc_other->talkAll( TRANSLATE("I dispise all things good. I shall not give thee another chance!"),1);
			}
		}
		else
		{
			sysmessage(s,TRANSLATE("You are dead and cannot do that."));
		}//npcaitype check
	}
	else
	{//if this not a npc but a player
		if(SrvParms->persecute)
		{//start persecute stuff - AntiChrist
			pc->targserial = pc_other->getSerial32();
			Skills::Persecute(s);
		}
		else
		{
			sysmessage(s,TRANSLATE("You are dead and cannot do that."));
		}
	}//if npc

}
开发者ID:nox-wizard,项目名称:noxwizard,代码行数:85,代码来源:rcvpkg.cpp


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