Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Lineage 2 Server Modifications ONLY! (https://postpacific.mmorpg-game.online/forumdisplay.php?f=28)
-   -   [SHARE] GM Petition client (https://postpacific.mmorpg-game.online/showthread.php?t=5632)

MuNLoK 04.09.2006 22:06

Ok, here you can find my report :)


Problem 1:

When I CheckOut one petition, I see:

Unknown packtG_NOTIFY_UNASSIGN


==================

Problem 2:

1) One user send a petition in-game.
2) You see correctly the petition in the list with status "Submit".
3) If the user click on "Cancel" petition, the petition is canceled correctly, but you see the petition in the list with "Submit" status.
4) Now you (thinking that this petition is active) click on checkout, and get:

2006-09-05 00:01:42 E [GM: MuNLoK(3)] Exception: Exception of type 'NC.PetitionD.NonExistingPetitionIdException' was thrown.
2006-09-05 00:01:42 E at NC.PetitionD.PetitionList.GetPetition(Int32 petitionId) in d:\project\hades\tool.net\application\petition\pet itiond\petition.cs:line 291
at NC.PetitionD.BusinessLogic.OnGmPacket_CheckOutPeti tion(GmSession gmSession, Unpacker p) in d:\project\hades\tool.net\application\petition\pet itiond\businesslogic.cs:line 492
at NC.PetitionD.BusinessLogic.OnGmPacket(GmSession gmSession, PacketType type, Unpacker p) in d:\project\hades\tool.net\application\petition\pet itiond\businesslogic.cs:line 217
2006-09-05 00:01:42 I [GM: MuNLoK(3)] Disconnected From GM


Next the GMClient is "block", and crash.


========================


Problem 3:

1) Two GMClient opened (two GMs OnLine with different machines.).
2) GM1 checkout one petition. The GM2 see the correct status for the petition (CheckOut or InChat).
3) If GM1 click on Check In (finish) the petition, the GM2 continuous seeing the "EndChat" status, instead of "MessageCheckIn".. closed status. If GM2 tries to open chat with the "EndChat" petition (thinking that this petition is active), you get the same error that before, "NonExistingPetitionIdException".


========================


Feature Request:

- Buttom/Option to can clear/remove closed petition (Status: "MessageCheckIn") from the petition list without need to close and start the GMClient.
- I see one table in db named "template". This like to be a "Text Template" to can do quick replies to the petitions. Will be nice if this can be implemented in the GMClient.


========================


Question:

- Why the users in-game can not evaluate to the GM? They can't click on the "Evaluate" option. In retail server, the evaluate window is open automatically when the petition is finished (if I don't remember bad), I can confirm it later.

Perhaps the GMClient need to send a packet to PetitionD when the petition is closed in order to activate the Evaluate option?


==================


Thank you! and good work!

aralyon 05.09.2006 16:26

Quote:

Originally Posted by MuNLoK (Post 66460)
Ok, here you can find my report :)
.....

ad 1) I forgot to register hander for that notify packet :)
ad 2) I forgot to implement G_NOTIFY_FINISH packet
ad 3) The same problem, I forgot to implement another notify packet (probably), there are lot of notify packets, so don't be surprise. And there is another bug related to there packets - because the window with petition details doesnt refresh after somebody else changed the petition. (It's about addition just few lines, but it didn't occur to me)

features - deleting - ok
- templates - I know about them, I just wasn't sure what are they for, I was going to implement them later, as well as update_category and view_past_petitions (because those features aren't nessecary for petitions)

Ad evaluation - i really don't know, I know about it, but I can't find out how to do it.

Thank you for you report, it's very helpful for me :)

MuNLoK 06.09.2006 23:26

Any news or update aralyon? :)

Shawnmb 07.09.2006 01:24

Suggestion: Canned Responses (stored in DB as global for all gms to use and individual which can be customized per-gm)

<3 aralyon

MuNLoK 10.09.2006 19:45

aralyon, no more updates? :( Perhaps, if you don't have time, can you share the sources to can continue your work? I think this project is a very good start and I don't want that it died :(

Shawnmb 11.09.2006 06:10

I agree ^^

SlayeR 12.09.2006 22:01

First off, GREAT job, works nearly flawless in SQL2000. Few things I noticed, other then a few spelling mistakes (doesn't seem like you speak fluent english, but great job with translations!).
1. I keep getting disconnected after a certain period of inactivity, so you need to Disconnect then Reconnect the client to get new petitions. Really annoying when you are trying to monitor petitions for an extended period of time.
2. Cant seem to figure out the "Head GM" login_flag, maybe put that in the documentation? Keeps giving me errors trying to edit or read other petitions from other GM accounts. :P
3. Submitting a petition does not take away from your '4' petitions daily.
4. There are always 11-12 petitions open.

One question on my mind: Is this "Safe", Anti-SQL inject,etc.

Cant really think of anything more yet, great job though. Keep up the great work!

Cardon 12.09.2006 23:45

I believe it determines Head GM flag by the builder on your account, not by a login flag. Might be wrong though.

ag1584 13.09.2006 05:35

2006-09-13 10:29:58 E Exception: Once the socket has been disconnected, you can only reconnect again asynchronously, and only to a different EndPoint. BeginConnect must be called on a thread that won't exit until the operation has been completed.
2006-09-13 10:29:58 E at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at NC.PetitionD.AuthConn.CheckPassword(String account, String password, Int32& accountUid) in d:\project\hades\tool.net\application\petition\pet itiond\authconn.cs:line 63
2006-09-13 10:29:58 I Fail Log: NetworkFail

why ?

aralyon 14.09.2006 15:30

Quote:

Originally Posted by Cardon (Post 67234)
I believe it determines Head GM flag by the builder on your account, not by a login flag. Might be wrong though.

HeadGM flag is from world server .... login_flag is used only when you are authing with your name and password.


Quote:

Originally Posted by slayer
3. Submitting a petition does not take away from your '4' petitions daily.

Quotes is in list of things to do.

2 MuNLoK and others: I was away

And for shawnmb - check your private message folder :)

MuNLoK 02.10.2006 23:19

any news? :(

top-gear 03.10.2006 10:53

i think the crashes every few minutes is the main problem. it would be also good to have a mass delete option or delete without answer

Sauron 09.10.2006 01:39

Quote:

Originally Posted by SlayeR (Post 67222)
3. Submitting a petition does not take away from your '4' petitions daily.

this will do the trick

Code:

/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
CREATE TABLE dbo.UserPetitions
        (
        account_id int NULL,
        amount int NULL
        )  ON [PRIMARY]
GO
COMMIT

insert into UserPetitions values(0,20061008);

IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[up_Server_GetCurrentQuota]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
-- =============================================
-- Author:                <Sauron>
-- Create date: <10.8.2006>
-- Description:        <Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[up_Server_GetCurrentQuota]
        -- Add the parameters for the stored procedure here
@accountuid int
AS
BEGIN
        -- SET NOCOUNT ON added to prevent extra result sets from
        -- interfering with SELECT statements.
        SET NOCOUNT ON;

        declare @today int;
        set @today = (select (year(getdate()) * 100 + dbo.FormatNumber(month(getdate())))*100+dbo.FormatNumber(day(getdate())));

        if(SELECT amount FROM UserPetitions WHERE account_id=0) <> @today
        begin
                DELETE FROM UserPetitions WHERE account_id <> 0;
                UPDATE UserPetitions SET amount = @today WHERE account_id = 0;
                SELECT 0 as amount;
        end;
        else
                SELECT isnull( sum(amount) , 0) as amount FROM UserPetitions WHERE account_id = @accountuid;

END
'
END

IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[up_Server_UpdateQuota]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
-- =============================================
-- Author:                <Sauron>
-- Create date: <10.8.2006>
-- Description:        <Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[up_Server_UpdateQuota]
        -- Add the parameters for the stored procedure here
@accountuid int,
@amount int
AS
BEGIN
        -- SET NOCOUNT ON added to prevent extra result sets from
        -- interfering with SELECT statements.
        SET NOCOUNT ON;

        declare @today int;
        set @today = (select (year(getdate()) * 100 + dbo.FormatNumber(month(getdate())))*100+dbo.FormatNumber(day(getdate())));

        if(SELECT amount FROM UserPetitions WHERE account_id=0) <> @today
        begin
                DELETE FROM UserPetitions WHERE account_id <> 0;
                UPDATE UserPetitions SET amount = @today WHERE account_id = 0;
        end;
        else
        begin
                if exists(select * from UserPetitions where account_id = @accountuid)
                        UPDATE UserPetitions SET amount = amount + @amount WHERE account_id = @accountuid;
                else
                        INSERT INTO UserPetitions values(@accountuid,1);
        end;
END
'
END

Quote:

Originally Posted by SlayeR (Post 67222)
4. There are always 11-12 petitions open.

i saw the same problem on retail C5 server



any idea about evaluate? i saw it enable just ones and dunno why -_-

paul 09.10.2006 07:44

Msg 137, Level 15, State 2, Procedure up_Server_UpdateQuota, Line 28
Must declare the scalar variable "@amount"

Error i got in mssql 2k5

It could be me but meh who knows i'm a little tipsy.

Sauron 09.10.2006 20:34

Quote:

Originally Posted by paul (Post 69705)
Msg 137, Level 15, State 2, Procedure up_Server_UpdateQuota, Line 28
Must declare the scalar variable "@amount"

Error i got in mssql 2k5

It could be me but meh who knows i'm a little tipsy.

my mistake.. change @ammount int to @amount int

Shawnmb 09.10.2006 20:46

Are you sure that the +~10 petitions thing is actually a bug? Could be a method to make it look like there's a lot of people in line to make up for sorry GM response times on retail.

ShinHawk 09.10.2006 21:02

Quote:

Originally Posted by Shawnmb (Post 69761)
Are you sure that the +~10 petitions thing is actually a bug? Could be a method to make it look like there's a lot of people in line to make up for sorry GM response times on retail.

i'd have to think so, ive noticed though that on offical NA, they are out sourcing thier petition system, last time i talked to a guy through petition system he told me may Vishnu guide you in your quest, and something about happiness

LoVeRSaMa 11.10.2006 12:36

I like it, llets just hope theres no call backs to you ;)

nathan :D

LoVeRSaMa 11.10.2006 13:08

<3 this its awsome, but hopefully theres no call backs for you ;)


nathan b)

Sauron 23.10.2006 02:52

it would be great to see the source shared :)


All times are GMT. The time now is 15:40.