package query.hessian.accounts;

import org.jetbrains.annotations.NotNull;
import replicationAnnotations.OuterWorldAPI;

/**
 * 4th version of account service interface that in addition allows to send item to avatar via in-game mail.
 *
 * @author andrey.kuprishov
 */
@OuterWorldAPI
public interface AccountService4 extends AccountService3 {
  /**
   * Give item to specified avatar. GameTool creates action and tries to perform action periodically.
   * Item will be given only when shard of avatar is online.
   *
   * @param shard shard of avatar.
   * @param avatarId  id of avatar on shard.
   * @param itemResourceId  item resource id.
   * @param runeResourceId  rune resource id (0 if no rune needed).
   * @param stackCount  stack count for stackable items, 1 for unstackable items.
   * @param counter counter for items with counters, -1 if item doesn't support counter.
   * @param senderName name of mail sender (e.g. Administration).
   * @param subject subject of mail
   * @param body body of mail
   * @return  result of giving item, contains status (succeeded, shard can be not found, avatar can be not found, etc.)
   *          and newly created action id to query this action via other api methods.
   *
   * @see GiveItemStatus
   * @see GiveItemResult
   * @throws AccountServiceException when internal GameTool error occures (e.g. DB unavailable).
   */
  @SuppressWarnings({"MethodWithTooManyParameters"})
  @NotNull
  GiveItemResult sendItemToAvatarByMail(@NotNull String shard, long avatarId, int itemResourceId, int runeResourceId, int stackCount, int counter, @NotNull String senderName, @NotNull String subject, @NotNull String body) throws AccountServiceException;  
}
