Project

General

Profile

Feature - Enhancement #2132

Please add Convert Agent method for item

Added by ethreayd over 2 years ago. Updated over 2 years ago.

Status:
Implemented
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2020-04-15
Due date:
% Done:

0%

Estimated time:
vbulletin_issue_id:

Description

Hello,

We already have an AddAgent method, but we don't have the new ConvertAgent feature. Is it possible to add that as a method to an Agent item ? Thanks !!!

#1

Updated by Amadeus over 2 years ago

There are two ways I can impliment this, which would you prefer?

  1. I can add the method to the 'item' datatype, but it would only be able to check if the item is an agent, not whether it is an "agent that can be collected".   Your scripts would have to check to check the item's iteminfo datatype member "NumItemsCreated" as being greater than 0 to ensure that it is a valid "agent that can be collected".
  2. I can add the method to the 'iteminfo' datatype and do all of the checks within the extension.  In other words, the script could try it on any item and it would just silently fail rather than create error messages, etc.

This process is unique in that the method itself only requires the 'item' datatype; however, the checks to ensure that the item is valid for collecting is within the 'iteminfo' datatype.  So, it really can go in either datatype.

#2

Updated by ethreayd over 2 years ago

I can go with both method. The first one seem simpler to me. What I will implement will be an Add Agent, then on the remaining Agent, a Convert Agent, then in the remaining Agent a Destroy Item. The second method could be implemented the same way but seem more complicate for you to do.

#3

Updated by Amadeus over 2 years ago

  • Status changed from New to Implemented

Added in version 20200416.0002

Also available in: Atom PDF