DC Mob Bug Fix for Vana V.02 (Need Testers)
this is the code:
Mobs.cpp
First:
(make a back up of your mobs.cpp before using this)
Search for this : void Mobs::dieMob(Player *player, Mob* mob) {
in mobs.cpp
and replace all the void Mobs::dieMob(Player *player, Mob* mob) {
}
with this:
VERSION 0.1
Code:
void Mobs::dieMob(Player *player, Mob* mob) {
int map = player->getMap();
//mob != NULL &&
if (map > -1 ){
MobsPacket::dieMob(player, Maps::info[player->getMap()].Players, mob, mob->getID());
// Account for Holy Symbol
int hsrate = 0;
if (player->skills->getActiveSkillLevel(2311003)>0) {
hsrate = Skills::skills[2311003][player->skills->getActiveSkillLevel(2311003)].x;
}
else if (player->skills->getActiveSkillLevel(5101002)>0) {
hsrate = Skills::skills[5101002][player->skills->getActiveSkillLevel(5101002)].x;
}
Levels::giveEXP(player, (mobinfo[mob->getMobID()].exp + ((mobinfo[mob->getMobID()].exp*hsrate)/100)) * ChannelServer::Instance()->getExprate());
//Mobs::
//mobinfo[mob->getPosX()] mobinfo[mob->getPosY()]
Drops::dropMob(player, mob);
// Spawn mob(s) the mob is supposed to spawn when it dies
for (unsigned int i = 0; i < mobinfo[mob->getMobID()].summon.size(); i++) {
spawnMobPos(player->getMap(), mobinfo[mob->getMobID()].summon[i], mob->getPosX(), mob->getPosY()-1);
}
player->quests->updateQuestMob(mob->getMobID());
if(mob->getHP() <= 0){
mobs[player->getMap()].erase(mob->getID());
delete mob;
}
else
return;
//mobs.erase
}
}
Version .02
Code:
void Mobs::dieMob(Player *player, Mob* mob) {
int map = player->getMap();
//mob != NULL &&
if (mob == NULL) return;
if (map > -1 && mob != NULL ){
MobsPacket::dieMob(player, Maps::info[player->getMap()].Players, mob, mob->getID());
// Account for Holy Symbol
int hsrate = 0;
if (player->skills->getActiveSkillLevel(2311003)>0) {
hsrate = Skills::skills[2311003][player->skills->getActiveSkillLevel(2311003)].x;
}
else if (player->skills->getActiveSkillLevel(5101002) > 0) {
hsrate = Skills::skills[5101002][player->skills->getActiveSkillLevel(5101002)].x;
}
Levels::giveEXP(player, (mobinfo[mob->getMobID()].exp + ((mobinfo[mob->getMobID()].exp*hsrate)/100)) * ChannelServer::Instance()->getExprate());
//Mobs::
//mobinfo[mob->getPosX()] mobinfo[mob->getPosY()]
Drops::dropMob(player, mob);
// Spawn mob(s) the mob is supposed to spawn when it dies
for (unsigned int i = 0; i < mobinfo[mob->getMobID()].summon.size(); i++) {
spawnMobPos(player->getMap(), mobinfo[mob->getMobID()].summon[i], mob->getPosX(), mob->getPosY()-1);
}
if (mob->getMapID() > -1) // Add spawn point to respawns queue if mob was spawned by a spawn point.
respawns[player->getMap()].push(mob->getMapID());
player->quests->updateQuestMob(mob->getMobID());
if(mob->getHP() <= 0){
mobs[player->getMap()].erase(mob->getID());
delete mob;
}
else
return;
//mobs.erase
}
}
just replace this with your original code, since i already post this in vana
i guess i should post this here too
it works for me
cheers
this is only FOR VANA
some people says it dosnt work...
but i try it for almost 1 hour and... dint get a DC from any mob
feel free to use it and test it (back up your old mobs.cpp)
or just dont use it
cheers
Re: [Release] DC Mob Bug Fix for Vana
Re: [Release] DC Mob Bug Fix for Vana
Re: [Release] DC Mob Bug Fix for Vana
Quote:
Originally Posted by
robtbs
test it already?
Yup...
Re: [Release] DC Mob Bug Fix for Vana
Re: [Release] DC Mob Bug Fix for Vana
Quote:
Originally Posted by
robtbs
and it works right?
:p
Yup =D
Re: [Release] DC Mob Bug Fix for Vana
Code:
------ Build started: Project: ChannelServer, Configuration: Debug Win32 ------
Compiling...
Mobs.cpp
Linking...
Mobs.obj : error LNK2019: unresolved external symbol "class Mob * __cdecl Mobs::getMob(int,int)" (?getMob@Mobs@@YAPAVMob@@HH@Z) referenced in function "void __cdecl Mobs::monsterControl(class Player *,class ReadPacket *)" (?monsterControl@Mobs@@YAXPAVPlayer@@PAVReadPacket@@@Z)
C:\Documents and Settings\אפיק\שולחן העבודה\Afik\Private server\vana\Debug\ChannelServer\ChannelServer.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Documents and Settings\אפיק\שולחן העבודה\Afik\Private server\vana\Debug\ChannelServer\BuildLog.htm"
ChannelServer - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 3 up-to-date, 0 skipped ==========
did i replaced the wrong code?
lol
Re: [Release] DC Mob Bug Fix for Vana
Yup been replace Wrong code *
Re: [Release] DC Mob Bug Fix for Vana
o.O
can u give me the right code to replace?
or prehaps give me a link to the updated Mob.cpp file?
Re: [Release] DC Mob Bug Fix for Vana
wow...nice release !
mind explain what causes the dc bug?
Re: [Release] DC Mob Bug Fix for Vana
Can u please upload the updated Mob.cpp
Or tell us which code to replace?
Nice relase btw!
Re: [Release] DC Mob Bug Fix for Vana
Nice release this might also solve the random d/cing when killing mobs on Titan v.55.
Re: [release?] DC Mob Bug Fix for Vana
if you use vana
just search void Mobs::dieMob(Player *player, Mob* mob) {
and replace it with this... or wait until the devs fix it or add it to the download section
Re: [release?] DC Mob Bug Fix for Vana
im using vana
and to replace this line only?
Re: [release] DC Mob Bug Fix for Vana
;_;
the full code i clearly sayd lol :P
feel free to use it or not to use it
:p