[C++/Python] 5 Inventarseiten

08/21/2015 23:20 q.@quaresma741#1
*bitte Zitieren wegen den Links, hab noch keine 100 Beiträge :O

HuHu,

poste euch heute ma 5 inventarseiten (kann mann erweitern)^^
da ich es hier, auf metin2*** und woanders nicht gefunden hab poste ich es ma^^

Bild:

Serverside:

als erstes gehen wir in den Verzeichnis /Server/common und öffnen legth.h

suchen nach:

Code:
INVENTORY_MAX_NUM        = 90,
ersetzen dies mit:
Code:
INVENTORY_MAX_NUM        = 225,
speichern und schließen

nun gehen wir in den Verzeichnis /server/game/src und öffnen exchange.cpp

suchen nach:
Code:
    static CGrid s_grid1(5, INVENTORY_MAX_NUM/5 / 2); // inven page 1
    static CGrid s_grid2(5, INVENTORY_MAX_NUM/5 / 2); // inven page 2
ersetzen mit:
Code:
static CGrid s_grid1(5, INVENTORY_MAX_NUM/5 / 5); // inven page 1     
static CGrid s_grid2(5, INVENTORY_MAX_NUM/5 / 5); // inven page 2
static CGrid s_grid3(5, INVENTORY_MAX_NUM/5 / 5); // inven page 3
static CGrid s_grid4(5, INVENTORY_MAX_NUM/5 / 5); // inven page 4
static CGrid s_grid5(5, INVENTORY_MAX_NUM/5 / 5); // inven page 5
suchen dann
Code:
    s_grid1.Clear();
    s_grid2.Clear();
fügen darunter:
Code:
    s_grid3.Clear();
    s_grid4.Clear();
    s_grid5.Clear();
nun weiter suchen nach,
Code:
for (i = 0; i < INVENTORY_MAX_NUM / 2; ++i)
und ändern den code Block mit das hier
Code:
for (i = 0; i < INVENTORY_MAX_NUM / 5; ++i)
{
  if (!(item = victim->GetInventoryItem(i)))
   continue;

  s_grid1.Put(i, 1, item->GetSize());
}
for (i = INVENTORY_MAX_NUM / 5; i < (INVENTORY_MAX_NUM / 5) * 2; ++i)
{
  if (!(item = victim->GetInventoryItem(i)))
   continue;

  s_grid2.Put(i - INVENTORY_MAX_NUM / 5, 1, item->GetSize());
}
for (i = (INVENTORY_MAX_NUM / 5) * 2; i < (INVENTORY_MAX_NUM / 5) * 3; ++i)
{
  if (!(item = victim->GetInventoryItem(i)))
   continue;

  s_grid3.Put(i - (INVENTORY_MAX_NUM / 5) * 2, 1, item->GetSize());
}
for (i = (INVENTORY_MAX_NUM / 5) * 3; i < (INVENTORY_MAX_NUM / 5) * 4; ++i)
{
  if (!(item = victim->GetInventoryItem(i)))
   continue;

  s_grid4.Put(i -(INVENTORY_MAX_NUM / 5) * 3, 1, item->GetSize());
}
for (i = (INVENTORY_MAX_NUM / 5) * 4; i < (INVENTORY_MAX_NUM / 5) * 5; ++i)
{
  if (!(item = victim->GetInventoryItem(i)))
   continue;

  s_grid5.Put(i - (INVENTORY_MAX_NUM / 5) * 4, 1, item->GetSize());
}
nun speichern wir exchange.cpp ab und öffnen char_item.cpp.

suchen nach: (mehr mals suchen)
Code:
 INVENTORY_MAX_NUM / 2
und ersetzen alles mit
Code:
INVENTORY_MAX_NUM / 5
Clientside:

Client/Userinterface und öffnen GameType.h und suchen nach:
Code:
const DWORD c_Inventory_Page_Count = 2;
ändern in:
Code:
const DWORD c_Inventory_Page_Count = 5;

dann gibts noch die Python zeug
eifügen müsste klar sein.

entpackt locale_de.eix/epk und uiscript.eix/epk

[Only registered and activated users can see links. Click Here To Register...]

muss in char.h und in char_item.cpp verändert werden
Danke dir, dieser fehler war mir nicht bekannt :D

Quote:
Originally Posted by Mr. 'Avenue™ View Post
225 inv + ausgerüstete gegenstände + kostüme + belt sind über 255
Überschreitet also "BYTE"
BYTE bCell / BYTE bDestCell überall zu DWORD bCell & DWORD bDestCell ändern
08/21/2015 23:27 Mr. 'Avenue™#2
225 inv + ausgerüstete gegenstände + kostüme + belt sind über 255
Überschreitet also "BYTE"
BYTE bCell / BYTE bDestCell überall zu WORD bCell & WORD bDestCell ändern
08/21/2015 23:29 Forcetraeger#3
und aus :
static CGrid s_grid3(5, INVENTORY_MAX_NUM/5 / 2); // inven page 3
static CGrid s_grid4(5, INVENTORY_MAX_NUM/5 / 2); // inven page 3
static CGrid s_grid5(5, INVENTORY_MAX_NUM/5 / 2); // inven page 3

static CGrid s_grid3(5, INVENTORY_MAX_NUM/5 / 5); // inven page 3
static CGrid s_grid4(5, INVENTORY_MAX_NUM/5 / 5); // inven page 3
static CGrid s_grid5(5, INVENTORY_MAX_NUM/5 / 5); // inven page 3


machen sonst buggt handeln rum ^^

Danke fürs RLS ^^
08/21/2015 23:30 -Katekyo™#4
Danke für das Release, man sieht jetzt zumindest mal was geändert wird bei 4 zu 5 Inventar Seiten, somit könnte theoretisch jeder selbst alles erweitern. :)
__________________

Dein Thread wurde dem [Only registered and activated users can see links. Click Here To Register...] hinzugefügt.
08/22/2015 00:14 rollback#5
Quote:
Originally Posted by -Katekyo™ View Post
Danke für das Release, man sieht jetzt zumindest mal was geändert wird bei 4 zu 5 Inventar Seiten, somit könnte theoretisch jeder selbst alles erweitern. :)
__________________

Dein Thread wurde dem [Only registered and activated users can see links. Click Here To Register...] hinzugefügt.
Man muss natürlich auch die Datentypen beachten, wie Mr. Avenue auch schon geschrieben hat würde es so garnicht klappen mit 5 Seiten ;)
08/22/2015 02:08 iCaLoXi1#6
/Server/common ??? 40k Files wo ich find nix...
08/22/2015 02:19 holosko74#7
haste nen Source Server?
wenn nein kannse den thread vergessen
08/22/2015 11:15 .J0ker#8
Ist doch schon mit 4 Seiten Public oder nicht ? warum dann noch ein Thread mit 5 seiten
08/22/2015 12:16 kstmr#9
Quote:
Originally Posted by Mr. 'Avenue™ View Post
225 inv + ausgerüstete gegenstände + kostüme + belt sind über 255
Überschreitet also "BYTE"
BYTE bCell / BYTE bDestCell überall zu DWORD bCell & DWORD bDestCell ändern
from byte (unsigned char (1 byte/8 bits) to a dword (unsigned int (4 byte / 32 bit (currently)) this could be ok on some old implimantation from the 90s but we are in 2015. even when it comes to value a byte can hold up to 255 a dword can hold 4kkk . use a more apopreat type.
and :

PHP Code:
static CGrid s_grid1(5INVENTORY_MAX_NUM/2); // inven page 1     
static CGrid s_grid2(5INVENTORY_MAX_NUM/2); // inven page 2
static CGrid s_grid3(5INVENTORY_MAX_NUM/2); // inven page 3     
static CGrid s_grid4(5INVENTORY_MAX_NUM/2); // inven page 3     
static CGrid s_grid5(5INVENTORY_MAX_NUM/2); // inven page 3 
this is bullshit .
it should be like this :
PHP Code:
static CGrid s_grid1(5INVENTORY_MAX_NUM/5); // inven page 1     
static CGrid s_grid2(5INVENTORY_MAX_NUM/5); // inven page 2
static CGrid s_grid3(5INVENTORY_MAX_NUM/5); // inven page 3
static CGrid s_grid4(5INVENTORY_MAX_NUM/5); // inven page 4
static CGrid s_grid5(5INVENTORY_MAX_NUM/5); // inven page 5 
same for this :
PHP Code:
   for (0INVENTORY_MAX_NUM 5; ++i)
    {
        if (!(
item victim->GetInventoryItem(i)))
            continue;
 
        
s_grid1.Put(i1item->GetSize());
    }
    for (
INVENTORY_MAX_NUM 5INVENTORY_MAX_NUM; ++i)
    {
        if (!(
item victim->GetInventoryItem(i)))
            continue;
 
        
s_grid2.Put(INVENTORY_MAX_NUM 51item->GetSize());
    }
 
    for (
INVENTORY_MAX_NUM 5INVENTORY_MAX_NUM; ++i)
    {
        if (!(
item victim->GetInventoryItem(i)))
            continue;
 
        
s_grid3.Put(INVENTORY_MAX_NUM 51item->GetSize());
    }
    for (
INVENTORY_MAX_NUM 5INVENTORY_MAX_NUM; ++i)
    {
        if (!(
item victim->GetInventoryItem(i)))
            continue;
 
        
s_grid4.Put(INVENTORY_MAX_NUM 51item->GetSize());
    }
    for (
INVENTORY_MAX_NUM 5INVENTORY_MAX_NUM; ++i)
    {
        if (!(
item victim->GetInventoryItem(i)))
            continue;
 
        
s_grid5.Put(INVENTORY_MAX_NUM 51item->GetSize());
    } 
here is a correct yet ugly way to do it :
PHP Code:
int i;

for (
0INVENTORY_MAX_NUM 5; ++i)
{
  if (!(
item victim->GetInventoryItem(i)))
   continue;

  
s_grid1.Put(i1item->GetSize());
}
for (
INVENTORY_MAX_NUM 5< (INVENTORY_MAX_NUM 5) * 2; ++i)
{
  if (!(
item victim->GetInventoryItem(i)))
   continue;

  
s_grid2.Put(INVENTORY_MAX_NUM 51item->GetSize());
}
for (
= (INVENTORY_MAX_NUM 5) * 2< (INVENTORY_MAX_NUM 5) * 3; ++i)
{
  if (!(
item victim->GetInventoryItem(i)))
   continue;

  
s_grid3.Put(- (INVENTORY_MAX_NUM 5) * 21item->GetSize());
}
for (
= (INVENTORY_MAX_NUM 5) * 3< (INVENTORY_MAX_NUM 5) * 4; ++i)
{
  if (!(
item victim->GetInventoryItem(i)))
   continue;

  
s_grid4.Put(-(INVENTORY_MAX_NUM 5) * 31item->GetSize());
}
for (
= (INVENTORY_MAX_NUM 5) * 4< (INVENTORY_MAX_NUM 5) * 5; ++i)
{
  if (!(
item victim->GetInventoryItem(i)))
   continue;

  
s_grid5.Put(- (INVENTORY_MAX_NUM 5) * 41item->GetSize());

good luck
08/22/2015 14:21 -Katekyo™#10
Quote:
Originally Posted by .J0ker View Post
Ist doch schon mit 4 Seiten Public oder nicht ? warum dann noch ein Thread mit 5 seiten
Damit man den Unterschied sieht (was bearbeitet wird) und zu dem wollen halt manche 5 Seiten haben, Cyperia hat doch auch 5. :p
08/23/2015 18:38 thespeedyy#11
da fehlt der python teil für inventory^^
08/23/2015 20:47 ProfessorEnte#12
Mal gespannt wann wer 10 Seiten raushaut.
08/24/2015 00:03 Tuora#13
Quote:
Originally Posted by ProfessorEnte View Post
Mal gespannt wann wer 10 Seiten raushaut.
Hahaha :D ja wird sicherlich noch rausgehauen ^^,nettes release danke
08/24/2015 16:14 .Alpha.#14
Bitte vergesst nicht in der IsEmptyItemGrid

BYTE bCell = (BYTE)Cell.cell;
auf
WORD bCell = Cell.cell;

und auch nichtBYTE p = bCell + (5 * j);
auf
WORD p = bCell + (5 * j);


vergessen

zu ändern
sonst habt ihr einige Probleme
08/25/2015 18:50 °~Dennis~°#15
[Only registered and activated users can see links. Click Here To Register...]

Done! :D