SET @LastDate = DATEADD(DAY, -1, [USER=27358]date[/USER])
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
BEGIN TRY
SELECT TOP(1)
Name,Class,Level,Female,Race,Exp,Angle,Money,Integration,MapId,SpaceType,
PosX,PosY,PosZ,Hp,Mp,Sp,Ep,Fp,Tp,Rp,Ap,Cp,Cg,Fire,Ice,Light,Dark,InvenSlot,ExpirationPeriodInvenSlot,FellowBagSlot,BoostSlot,KeepingSlot, StartIdx,
ItemSerialOrder,PartyID,byIllegal,OnBoardSkillUnsealed,Comment,
GuildDBKey,GuildMemberType,EventInGateArea,StaticWarpArea,DynamicWarpMap,
DynamicWarpPosX,DynamicWarpPosY,DynamicWarpPosZ,DynamicWarpAngle,InvenPrioritize,
InvenBag1Prioritize,InvenBag2Prioritize,InvenBag3Prioritize,InvenBag4Prioritize,
SummonFellow,bMount,LastSummonFellow,byUnderware,TotalPlayTime,
FellowSlot,FellowSlotExp,FarmDBKey, SoulPoint, bCanUseSoulTalents, CanUseSoulTalentsAwaken, AchievementPoint, TitleRecID,
case when LastAccessDate <= @LastDate or (LastAccessDate <= [USER=27358]date[/USER] and GETDATE() >= [USER=27358]date[/USER]) then 1 else 0 end bReset,
bMilitiaType, CreateTime, MentoringPenaltyTime, MentoringGraduationCount
FROM Table_CharBase WITH(nolock) WHERE DBKey= [USER=363813]KEY[/USER] AND Deleted=0
END TRY
BEGIN CATCH
IF @@TRANCOUNT > 0 ROLLBACK
EXEC dbo.common_RaiseError;
END CATCH
END