吾爱尚玩资源基地

标题: 仿官方魔兽世界私服M服务端。让玩家死亡后,团队成员可见 [打印本页]

作者: admin    时间: 2016-4-21 23:48
标题: 仿官方魔兽世界私服M服务端。让玩家死亡后,团队成员可见
让玩家死亡后,团队成员可见,顾名思义,就是死亡后,你的团队成员照样可以看见你。。适用于mangos端。。比较老的代码,作为参考使用


diff - git a / src / game / Player . cpp b / src / game / Player . cpp index d187d68 . f9509e .1 100644
--- a / src / game / Player . cpp
+ + + b / src / game / Player . cpp
@ @ - 19564 , 6 + 19 564 , 20 @ @ bool Player :: IsVisibleInGridForPlayer ( Player * pl  ) const
         Return true ;
     }

+    / / See Dead Live Player Player Only in this Group
+ If (const Group * pGroup = GetGroup ())
+ {
+ If ( pGroup )
+ {
+            Unit * target = (( Player *) pl );
+ If ( target -> GetTypeId () == TYPEID_PLAYER & & pGroup -> IsMember ((( Player *) target ) -> GetObjectGuid ()))
+ {
+ If (! ( IsAlive () | | m_deathTimer > 0 ) & & IsFriendlyTo ( pl ))
+ Return true ;
+}
+}
+}
+
     / / Live player see live player or dead player with not realized corpse
     if ( pl -> IsAlive () | | pl -> m_deathTimer > 0 )
     {  


作者: 1314    时间: 2016-10-15 13:23
感谢楼主分享,祝愿吾爱尚玩越来越好!




欢迎光临 吾爱尚玩资源基地 (http://bbs.523play.com/) Powered by Discuz! X3.4