Register for your free account! | Forgot your password?

You last visited: Today at 15:59

  • Please register to post and access all features, it's quick, easy and FREE!

Update System

Discussion on Update System within the CO2 PServer - Discussions / Questions forum part of the Conquer Online 2 category.

Old   #1
elite*gold: 0
Join Date: Aug 2007
Posts: 1,524
Received Thanks: 230
Update System

well in the source Am using (Impulse based Source ) i see that the Flags ID arent too long this is an example :-

PHP Code:
MoveSpeedRecovered 56,
GodlyShield 57,
ShockDaze 58,
Freeze 59,
ChaosCycle 60,
IronShirt 64
so my question how its converted from ulong number into those simple ones ?
and i didnt understand what how its going in this void.. i need full Critisize about this void

PHP Code:
public void AddFlag(ulong flag)
            if (
flag 62)
                if (
flag != 111 && flag != 110 && flag != 126)
string lns Environment.StackTrace.Split(new char[] { '\n''\r' }, StringSplitOptions.RemoveEmptyEntries)[2];
lns lns.Replace("at Conquer_Online_Server.Game.Attacking.Handle.Execute() in """);
File.AppendAllText("linktotops"Name " " flag " " lns "\n\r\n\r");
StatusFlag2 |= (ulong)((ulong)<< ((int)flag 63));
StatusFlag1 |= (ulong)((ulong)<< ((int)flag));

shadowman123 is offline  
Old 02/04/2013, 23:26   #2
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,313
It's doing a few things.

#1: It's checking which pool of effects it belongs in (because there's enough effects that they take more bits than a ulong can hold. As such most sources use 2 ulongs (StatusFlag1 and StatusFlag2)

#2: If it belongs in the second pool then it reduces by the max Flag1Value.

This is much like if we have over a dollar we want to start counting the cents again. (101 - 100 = 1. We have 1 cent). That's what the 1 << (flag - 63) is doing.

#3: It then uses bitwise operations to set the correct bit to on (1)

pro4never is offline  
1 User

« Legality Questions | KOCounter multiply the value by 2 »

Similar Threads
Question about update system
04/11/2012 - DarkOrbit - 1 Replies
Hey, I found my really old not-finished project 'Darkorbit 1vs1 simulator' and I decided to build it again (to recap vb skills:) ) So I starded yesterday and first problem appeared :D I dunno how to calculate correctly dmg and shield with updates. I dont have anymore any DO account so I cannot test neither. So do you know how to calculate correctly? Or are those number 100% correctly in English forum? Damage Shield I think I will add "Lvl: 1/8/16" button or something like that to my...
Das Stern System [UPDATE MIT %]
08/01/2010 - Main - 34 Replies
EPvP hat ein anscheint ein kleines Update bekommen . Wenn ihr euch gefragt hab " wann komm ich den endlich LvL-UP " ? Dann werdet ihr euch jetzt sicherlich über das Update freuen, weil ihr jetzt wenn ihr auf mit eurer Maus auf einen Stern geht ihr nicht nur das LvL seht sondern auch wie viel % noch zum nächsten LvL-UP fehlen. Mfg Infinity.
[Delphi][Tut][ENG] Update System
03/19/2010 - Coding Tutorials - 2 Replies
How many tags u.u Well, let's start with the tutorial. Well, it's a simple system, it downloads an program/file/something from your FTP. in Uses put urlmon,shellapi; Add the function: function DownloadFile(Source, Dest: string): Boolean; begin
update (clan system?)
03/17/2010 - WarRock - 4 Replies
hi leute, was kommt da wieder für ein update?...könnte es vlt das neue clansystem sein? das letzte kam ja auch vor ca. 1 jahr...
Clan System Update
03/01/2010 - WarRock - 1 Replies
hallo Leute, wollte euch mal fragen wann das update fürs clansystem kommt, eigentlich war es ja schon für Februar angekündigt kommt es also bald schon? Und wie lief es bisjetzt immer, hat man wenn früher updates kamen, ein paar Tage zeit sich einen Clan auf du kaufen und wie teuer war so ein Clan? Hoffe ihr könnt mir helfen mfg gx

All times are GMT +1. The time now is 15:59.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2019 elitepvpers All Rights Reserved.