[code][Mangos]工资改为按时间领取的源码

[code][Mangos]工资改为按时间领取的源码
  case   7  :
                      
if (player -> GetLevelPlayedTime()  >   28800 //  条件检查你在线时间大于8H.                      {
                        player -> ModifyMoney(int32( 1500000 ));  // 满足条件获得150金币
                        player -> SetInGameTime(uint32(NULL));  // 将在玩家线时间归零
                        player -> SEND_GOSSIP_MENU( 88882 ,_Item -> GetGUID());
                      } 
else   if (player -> GetLevelPlayedTime()  >   18000 )
                      {
                        player
-> ModifyMoney(int32( 800000 ));
                        player
-> SetInGameTime(uint32(NULL));
                        player
-> SEND_GOSSIP_MENU( 88883 ,_Item -> GetGUID());
                      } 
else   if (player -> GetLevelPlayedTime()  >   7200 )
                      {
                        player
-> ModifyMoney(int32( 300000 ));
                        player
-> SetInGameTime(uint32(NULL));
                        player
-> SEND_GOSSIP_MENU( 88884 ,_Item -> GetGUID());
                                          } 
else   if (player -> GetLevelPlayedTime()  >   3600 )
                      {
                        player
-> ModifyMoney(int32( 100000 ));
                        player
-> SetInGameTime(uint32(NULL));
                        player
-> SEND_GOSSIP_MENU( 88886 ,_Item -> GetGUID());
                    }
else  player -> SEND_GOSSIP_MENU( 88885 ,_Item -> GetGUID());
                    
break ;


最后在数据库npc_text里面加入 
88881 ~88886的npc说话内容

你可能感兴趣的:([code][Mangos]工资改为按时间领取的源码)