Ejemplo n.º 1
0
	void GroupMgr::addLightLink(
		const std::string &groupname, 
		const std::string &objInst, 
		const std::string &lightInst)
	{
		addLightLink(GroupID(groupname), objInst, lightInst);
	}
Ejemplo n.º 2
0
	void GroupMgr::addObjectInstance(
		const std::string &groupname, 
		const std::string &objInstanceName,
		const GroupInstanceType type
		)
	{
		addObjectInstance(GroupID(groupname), objInstanceName, type);
	}
void Player::RemoveHull(float hull_dmg, Object *mob)
{
    float hull = ShipIndex()->GetHullPoints() - hull_dmg;

    ShipIndex()->SetHullPoints(hull);

    //If we have used all of the hull, the player goes BOOM!
    if (hull <= 0.0f)
    {
        ShipIndex()->SetHullPoints(0);
        ShipIndex()->SetIsIncapacitated(true);

		if(GetCurrentSkill())
		{
			GetCurrentSkill()->InterruptSkillOnAction(INCAPACITATE);
		}

		// Break formation/Leave Formation if in group
		if (GroupID() != -1)
		{
			g_PlayerMgr->BreakFormation(GameID());
			g_PlayerMgr->LeaveFormation(GameID());
		}

		// Stop regen
		RemoveEnergy(0);
		ShipIndex()->Shield.SetStartValue(GetShield());
		ShipIndex()->Shield.SetEndTime(GetNet7TickCount());		// Set end time now!

        ImmobilisePlayer();
        TerminateWarp();    //This sends the packet (TODO: Remove packet send from here)

		// Send Data
		SendAuxShip();

		//now deselect player's target - this causes the immobilisation to occur
		UnSetTarget(-1);

        //Stop any mobs from attacking
		//ObjectManager *om = GetObjectManager();
        //if (om) om->RemovePlayerFromMOBRangeLists(this);
        if (mob && mob->HostilityTarget() == this->GameID())
        {
            mob->LostTarget(this);
        }

        m_Mutex.Lock();

        Player *p = (0);

		while (g_PlayerMgr->GetNextPlayerOnList(p, m_RangeList))
		{
            p->PointEffect(Position(), 1017);
        }

        m_Mutex.Unlock();
    }
}
Ejemplo n.º 4
0
		void GroupChatMsgArrivedNotify::process(InstancePtr instance, ConnectionPtr connection, const Uri& from, RequestMsg& msg)
		{
			group_messaging_server::methods::rpc::GrpChatMsgArrivedNotify notify;
			if (!notify.ParseFromString(msg.data()))
			{
				LOG(error, "parse error! " << DUMP_STRING(msg.data()));
				throw ParseException();
			}

			data_.reset(new Data);
			data_->sender = UserPtID(notify.sender_ua_uri(), instance->getDomain());
			data_->group_id = GroupID(from, instance->getDomain());
			data_->msg_id = notify.msg_id();
			data_->msg_time = notify.msg_time();
			data_->content = notify.content();
			data_->content_type = notify.content_type();

			onNotification(instance);
		}
Ejemplo n.º 5
0
	void GroupMgr::createGroup(/*const long frame,*/ const std::string &groupname)
	{
		createGroup(GroupID(/*frame,*/ groupname));
	}