Page MenuHomeFeedback Tracker

[Feature Request] Add more info about process of destruction to actiondestroycombinationlock.c
Closed, ResolvedPublic

Description

Now:

override string GetAdminLogMessage(ActionData action_data)
	{
		return " destroyed combination lock with " + action_data.m_MainItem.GetDisplayName();
	}

Feature-request:

override string GetAdminLogMessage(ActionData action_data)
	{
		Fence fence = Fence.Cast( action_data.m_Target.GetObject() );
		if ( fence )
		{
			CombinationLock combination_lock = fence.GetCombinationLock();
      if ( combination_lock )
			{
        /* const int STATE_RUINED 		 	= 4;
        const int STATE_BADLY_DAMAGED 	= 3;
        const int STATE_DAMAGED 	  	= 2;
        const int STATE_WORN 		  	= 1;
        const int STATE_PRISTINE 	  	= 0; */

        string combinationLockHealth;
        string itemHealth;

        switch (combination_lock.GetHealthLevel())
        {
        case GameConstants.STATE_PRISTINE:
          combinationLockHealth = "Pristine";
        break;
        case GameConstants.STATE_WORN:
          combinationLockHealth = "Worn";
        break;
        case GameConstants.STATE_DAMAGED:
          combinationLockHealth = "Damaged";
        break;
        case GameConstants.STATE_BADLY_DAMAGED:
          combinationLockHealth = "Badly Damaged";
        break;
        case GameConstants.STATE_RUINED:
          combinationLockHealth = "Ruined";
        break;
        }

        switch (action_data.m_MainItem.GetHealthLevel())
        {
        case GameConstants.STATE_PRISTINE:
          itemHealth = "Pristine";
        break;
        case GameConstants.STATE_WORN:
          itemHealth = "Worn";
        break;
        case GameConstants.STATE_DAMAGED:
          itemHealth = "Damaged";
        break;
        case GameConstants.STATE_BADLY_DAMAGED:
          itemHealth = "Badly Damaged";
        break;
        case GameConstants.STATE_RUINED:
          itemHealth = "Ruined";
        break;
        }

        if (combination_lock.GetHealthLevel() != 4){
          return " tried to destroy " + combination_lock + "(" + combinationLockHealth + ")" + " with " + action_data.m_MainItem.GetDisplayName() + "(" + action_data.m_MainItem + " - " + itemHealth + ")";
        }
        else
        {
          return " destroyed " + combination_lock + "(" + combinationLockHealth + ")" + " with " + action_data.m_MainItem.GetDisplayName() + "(" + action_data.m_MainItem + " - " + itemHealth + ")";
        }        
      }
      else
      {
        return " destroyed combination lock with " + action_data.m_MainItem.GetDisplayName() + ". Item Health State = " + action_data.m_MainItem.GetHealthLevel();
      }
      
    }
    else
    {
      return " destroyed combination lock with " + action_data.m_MainItem.GetDisplayName() + ". Item Health State = " + action_data.m_MainItem.GetHealthLevel();
    }
	}

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Dedicated Server

Event Timeline

Geez changed the task status from New to Assigned.Apr 15 2020, 12:14 PM
PR9INICHEK added a subscriber: Geez.Sep 5 2020, 3:27 PM

Relates to T153482

@Geez please close this ticket

Geez closed this task as Resolved.Sep 7 2020, 1:23 PM
Geez claimed this task.