Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #006897

  • 1 - Low

  • Started

Issue Confirmations

  • Yes (0)No (0)
Photo

Follow 16914 zeny log (SQL) insert error

Posted by Hercules Bot on 14 November 2012 - 07:40 AM

Originally posted by Napster
This code lost zeny log type 'X'

  if(req.zeny > 0)
  {
   if( skill == NJ_ZENYNAGE )
	req.zeny = 0; //Zeny is reduced on skill_attack.
   if( sd->status.zeny < req.zeny )
	req.zeny = sd->status.zeny;
   pc_payzeny(sd,req.zeny,LOG_TYPE_OTHER,NULL); //@Need proper type
  }

and

/// obtain log type character for item/zeny logs
static char log_picktype2char(e_log_pick_type type)
{
switch( type )
{
  case LOG_TYPE_TRADE:		    return 'T';  // (T)rade
  case LOG_TYPE_VENDING:		  return 'V';  // (V)ending
  case LOG_TYPE_PICKDROP_PLAYER:  return 'P';  // (P)player
  case LOG_TYPE_PICKDROP_MONSTER: return 'M';  // (M)onster
  case LOG_TYPE_NPC:			  return 'S';  // NPC (S)hop
  case LOG_TYPE_SCRIPT:		   return 'N';  // (N)PC Script
  case LOG_TYPE_STEAL:		    return 'D';  // Steal/Snatcher
  case LOG_TYPE_CONSUME:		  return 'C';  // ©onsumed
  case LOG_TYPE_PRODUCE:		  return 'O';  // Pr(O)duced/Ingredients
  case LOG_TYPE_MVP:			  return 'U';  // MVP Rewards
  case LOG_TYPE_COMMAND:		  return 'A';  // (A)dmin command
  case LOG_TYPE_STORAGE:		  return 'R';  // Sto®age
  case LOG_TYPE_GSTORAGE:		 return 'G';  // (G)uild storage
  case LOG_TYPE_MAIL:			 return 'E';  // (E)mail attachment
  case LOG_TYPE_AUCTION:		  return 'I';  // Auct(I)on
  case LOG_TYPE_BUYING_STORE:	 return 'B';  // (B)uying Store
  case LOG_TYPE_LOOT:			 return 'L';  // (L)oot (consumed monster pick/drop)
  case LOG_TYPE_OTHER:   return 'X';  // Other
}
// should not get here, fallback
ShowDebug("log_picktype2char: Unknown pick type %d.\n", type);
return 'X';
}

add modify

ALTER TABLE `zenylog` MODIFY `type` ENUM('M','T','V','S','N','A','E','B','X') NOT NULL DEFAULT 'S';

thankyou