• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[7.72] OTHire 0.0.1b - Based in OTServ Trunk (Latest)

Downloaded :) Looks decent for the parts I seen, but there's alot of unfinished pieces and all of that which im sure you know :p
 
Cant edit for some reason, @up meant to comment on a different thread :X but I did download this, heard it was really buggy though.
 
I have fixed the ammunition conjure bug not removing capacity from the player, it will be addressed to the public distribution on Monday.
But if you would like to fix it yourself:

Make public void updateInventoryWeight();
In spells.cpp, add player->updateInventoryWeight();

At true results / success conjures at:

bool ConjureSpell::ConjureItem(const ConjureSpell* spell, Creature* creature, const std::string& param)

And at

ReturnValue ConjureSpell::internalConjureItem(Player* player, uint32_t conjureId, uint32_t conjureCount)

And at

ReturnValue ConjureSpell::internalConjureItem(Player* player, uint32_t conjureId,
uint32_t conjureCount, uint32_t reagentId, slots_t slot, bool test /*= false*/)

As @Schmanky said, I had fixed most of the bugs reported here in the first test server that was ran months ago, but the server is so big it's literally hard for me to maintain the code and changes from my partner, so it can sometimes mess up / remove bug fixes.


Im currently editing "bool ConjureSpell::ConjureItem(const ConjureSpell* spell, Creature* creature, const std::string& param)"
So I have edited line 1887 to add: player->updateInventoryWeight();
I get this error:

Code:
make[1]: Warning: File `spells.cpp' has modification time 38 s in the future
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1    -D__USE_MYSQL__      -DSYSCONFDIR=\"/usr/local/etc\" -DPKGDATADIR=\"/usr/local/share/otserv\" -D_THREAD_SAFE -D__OLD_GUILD_SYSTEM__ -D_REENTRANT -Wall -g -O2 -MT spells.o -MD -MP -MF .deps/spells.Tpo -c -o spells.o spells.cpp
spells.cpp: In static member function ‘static bool ConjureSpell::ConjureItem(const ConjureSpell*, Creature*, const std::string&)’:
spells.cpp:1887: error: no matching function for call to ‘Player::updateInventoryWeight(ReturnValue)’
player.h:651: note: candidates are: void Player::updateInventoryWeight()
make[1]: *** [spells.o] Error 1


If I change to player->updateInventoryWeight(RET_NOERROR);
I get this error:
Code:
make[1]: Warning: File `spells.cpp' has modification time 37 s in the future
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1    -D__USE_MYSQL__      -DSYSCONFDIR=\"/usr/local/etc\" -DPKGDATADIR=\"/usr/local/share/otserv\" -D_THREAD_SAFE -D__OLD_GUILD_SYSTEM__ -D_REENTRANT -Wall -g -O2 -MT spells.o -MD -MP -MF .deps/spells.Tpo -c -o spells.o spells.cpp
player.h: In static member function ‘static bool ConjureSpell::ConjureItem(const ConjureSpell*, Creature*, const std::string&)’:
player.h:651: error: ‘void Player::updateInventoryWeight()’ is protected
spells.cpp:1887: error: within this context
make[1]: *** [spells.o] Error 1


Any ideas how to fix?
 
Also when I add public void players->UpdateInventoryWeight(); to the top of the file, I get this error still.

Code:
make[1]: Warning: File `spells.cpp' has modification time 31 s in the future
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1    -D__USE_MYSQL__      -DSYSCONFDIR=\"/usr/local/etc\" -DPKGDATADIR=\"/usr/local/share/otserv\" -D_THREAD_SAFE -D__OLD_GUILD_SYSTEM__ -D_REENTRANT -Wall -g -O2 -MT spells.o -MD -MP -MF .deps/spells.Tpo -c -o spells.o spells.cpp
spells.cpp:41: error: expected unqualified-id before ‘public’
player.h: In static member function ‘static bool ConjureSpell::ConjureItem(const ConjureSpell*, Creature*, const std::string&)’:
player.h:651: error: ‘void Player::updateInventoryWeight()’ is protected
spells.cpp:1935: error: within this context
make[1]: *** [spells.o] Error 1

Vaaaary strange.
 
Also where is the public board and protected board,

I have found
Code:
void Player::updateInventoryWeight()
{
    inventoryWeight = 0.00;

    if(!hasFlag(PlayerFlag_HasInfiniteCapacity)){
        for(int i = SLOT_FIRST; i < SLOT_LAST; ++i){
            Item* item = getInventoryItem((slots_t)i);
            if(item){
                inventoryWeight += item->getWeight();
            }
        }
    }
}

In player.cpp but I dont see how I should change this to make it public.
 
Never mind I have fixed it. But now thats cleared up I have found a problem with houses. When people buy a house, after server relaunch they do not own the house and items are wiped. However, from this point forward if player buys house; it will save. I do not know why first time they buy house it does not save, any ideas?
 
Never mind I have fixed it. But now thats cleared up I have found a problem with houses. When people buy a house, after server relaunch they do not own the house and items are wiped. However, from this point forward if player buys house; it will save. I do not know why first time they buy house it does not save, any ideas?

Did not reproduce here. You could commit your fixes to GitHub project =p
 
Sure, will do seeing as Ezzz hasn't. But you say that you didn't reproduce the house problem?

This is the order it happens: Launch Server, Buy House; put items in house; /save;/shutdown; Open Server; No longer own house, and have to purchase again; /save:/shutdown; Still own house now and works properly.

You're saying this doesn't happen for you?
 
Sure, will do seeing as Ezzz hasn't. But you say that you didn't reproduce the house problem?

This is the order it happens: Launch Server, Buy House; put items in house; /save;/shutdown; Open Server; No longer own house, and have to purchase again; /save:/shutdown; Still own house now and works properly.

You're saying this doesn't happen for you?

I didn't tested houses exhaustively, but the times I tried it worked as intended, never noticied something like that.
 
To be honest, I just tested it again myself instead of just listening to reports and for some reason it didn't even happen. I have no idea what the deal is, haha! I have had 3-4 reports of houses being emptied and having to rebuy; but it didnt happen to me just now. So I don't know what happened to them.
 
@Update,

(Spellbook debug assertion information)
Wed Sep 10 23:14:26 2014
Windows Version: 6.1 build 7601 on 2 with Service Pack 1
Graphic Engine: 2
Last Packet Types: 150 030 109 106 030 030 160 112 114 030
Last Packet: 045 004 150 001 000 000 000 243 011 034 004 034 004 083 112 101
Player Position: [32336,31778,7]
Player.cpp 383: exception occurred, reason:
Network.cpp 885: exception occurred (ErrorCode = 0), reason:
Control.cpp 1280: exception occurred (Type = 150), reason:
Communication.cpp 2303: exception occurred, reason:
Network.cpp 482: exception occurred, reason:
Utils.cpp 310: assertion failed (Position = 1073) (Size = 1073), reason:
Position<=Size-2
Comment: Spellbook
 
@Update,

(Spellbook debug assertion information)
Wed Sep 10 23:14:26 2014
Windows Version: 6.1 build 7601 on 2 with Service Pack 1
Graphic Engine: 2
Last Packet Types: 150 030 109 106 030 030 160 112 114 030
Last Packet: 045 004 150 001 000 000 000 243 011 034 004 034 004 083 112 101
Player Position: [32336,31778,7]
Player.cpp 383: exception occurred, reason:
Network.cpp 885: exception occurred (ErrorCode = 0), reason:
Control.cpp 1280: exception occurred (Type = 150), reason:
Communication.cpp 2303: exception occurred, reason:
Network.cpp 482: exception occurred, reason:
Utils.cpp 310: assertion failed (Position = 1073) (Size = 1073), reason:
Position<=Size-2
Comment: Spellbook

I'm using default one, no bug, try this spells.xml.
 
Back
Top