Esempio n. 1
0
bool Party::setSharedExperience(Player* player, bool _sharedExpActive)
{
	if (!player || leader != player) {
		return false;
	}

	if (sharedExpActive == _sharedExpActive) {
		return true;
	}

	sharedExpActive = _sharedExpActive;

	if (sharedExpActive) {
		sharedExpEnabled = canEnableSharedExperience();

		if (sharedExpEnabled) {
			leader->sendTextMessage(MESSAGE_INFO_DESCR, "Shared Experience is now active.");
		} else {
			leader->sendTextMessage(MESSAGE_INFO_DESCR, "Shared Experience has been activated, but some members of your party are inactive.");
		}
	} else {
		leader->sendTextMessage(MESSAGE_INFO_DESCR, "Shared Experience has been deactivated.");
	}

	updateAllPartyIcons();
	return true;
}
Esempio n. 2
0
void Party::updateSharedExperience()
{
	if (sharedExpActive) {
		bool result = canEnableSharedExperience();
		if (result != sharedExpEnabled) {
			sharedExpEnabled = result;
			updateAllPartyIcons();
		}
	}
}
Esempio n. 3
0
bool Party::setSharedExperience(Player* player, bool _sharedExpActive)
{
    if(!player || getLeader() != player)
        return false;

    if(sharedExpActive == _sharedExpActive)
        return true;

    sharedExpActive = _sharedExpActive;
    if(sharedExpActive)
    {
        sharedExpEnabled = canEnableSharedExperience();
        if(sharedExpEnabled)
            getLeader()->sendTextMessage(MSG_INFO_DESCR, "Shared Experience is now active.");
        else
            getLeader()->sendTextMessage(MSG_INFO_DESCR, "Shared Experience has been activated, but some members of your party are inactive.");
    }
    else
        getLeader()->sendTextMessage(MSG_INFO_DESCR, "Shared Experience has been deactivated.");

    updateAllIcons();
    return true;
}